org.jminor.common.model.formats
Class DateFormats

java.lang.Object
  extended by org.jminor.common.model.formats.DateFormats

public final class DateFormats
extends Object

A collection of date format strings.


Field Summary
static String COMPACT
          ddMMyy
static String COMPACT_DASH
          dd-MM-yy
static String COMPACT_DOT
          dd.MM.yy
static String COMPACT_TIMESTAMP
          ddMMyy HH:mm
static String EXACT_TIMESTAMP
          dd-MM-yyyy HH:mm:ss.SSS
static String FULL_TIMESTAMP
          dd-MM-yyyy HH:mm:ss
static String SHORT_DASH
          dd-MM-yyyy
static String SHORT_DOT
          dd.MM.yyyy
static String SHORT_TIME
          HH:mm
static String SHORT_TIMESTAMP
          dd-MM-yy HH:mm
static String TIMESTAMP
          dd-MM-yyyy HH:mm
 
Method Summary
static SimpleDateFormat getDateFormat(String formatString)
          Instantiates a non-lenient date format
static SimpleDateFormat getDateFormat(String formatString, boolean lenient)
          Instantiates a date format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPACT_DASH

public static final String COMPACT_DASH
dd-MM-yy

See Also:
Constant Field Values

COMPACT

public static final String COMPACT
ddMMyy

See Also:
Constant Field Values

COMPACT_DOT

public static final String COMPACT_DOT
dd.MM.yy

See Also:
Constant Field Values

SHORT_DASH

public static final String SHORT_DASH
dd-MM-yyyy

See Also:
Constant Field Values

SHORT_DOT

public static final String SHORT_DOT
dd.MM.yyyy

See Also:
Constant Field Values

SHORT_TIME

public static final String SHORT_TIME
HH:mm

See Also:
Constant Field Values

TIMESTAMP

public static final String TIMESTAMP
dd-MM-yyyy HH:mm

See Also:
Constant Field Values

COMPACT_TIMESTAMP

public static final String COMPACT_TIMESTAMP
ddMMyy HH:mm

See Also:
Constant Field Values

SHORT_TIMESTAMP

public static final String SHORT_TIMESTAMP
dd-MM-yy HH:mm

See Also:
Constant Field Values

EXACT_TIMESTAMP

public static final String EXACT_TIMESTAMP
dd-MM-yyyy HH:mm:ss.SSS

See Also:
Constant Field Values

FULL_TIMESTAMP

public static final String FULL_TIMESTAMP
dd-MM-yyyy HH:mm:ss

See Also:
Constant Field Values
Method Detail

getDateFormat

public static SimpleDateFormat getDateFormat(String formatString)
Instantiates a non-lenient date format

Parameters:
formatString - the format string
Returns:
a non-lenient date format

getDateFormat

public static SimpleDateFormat getDateFormat(String formatString,
                                             boolean lenient)
Instantiates a date format

Parameters:
formatString - the format string
lenient - the lenient status
Returns:
a date format