Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static final String FULL_TIME_FORMAT = "HH:mm dd.MM.yy";
    private static final String FULL_TIME_FORMAT_AM_PM = "hh:mm aa dd.MM.yy";

    private static String getTimeFormat(String time) {
        return (time.contains("AM") || time.contains("PM")) ? FULL_TIME_FORMAT_AM_PM : FULL_TIME_FORMAT;
    }
}