Class TemporalConfig
- java.lang.Object
-
- com.healthmarketscience.jackcess.expr.TemporalConfig
-
public class TemporalConfig extends Object
A TemporalConfig encapsulates date/time formatting options for expression evaluation. The defaultUS_TEMPORAL_CONFIGinstance provides US specific locale configuration. Databases which have been built for other locales can utilize custom implementations of TemporalConfig in order to evaluate expressions correctly.- Author:
- James Ahlborn
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTemporalConfig.Type
-
Field Summary
Fields Modifier and Type Field Description static StringMEDIUM_DATE_FORMATstatic StringMEDIUM_TIME_FORMATstatic StringSHORT_TIME_FORMATstatic StringUS_DATE_FORMATstatic StringUS_LONG_DATE_FORMATstatic TemporalConfigUS_TEMPORAL_CONFIGdefault implementation which is configured for the US localestatic StringUS_TIME_FORMAT_12_FORMATstatic StringUS_TIME_FORMAT_24_FORMAT
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getAmPmStrings()StringgetDateFormat()chargetDateSeparator()StringgetDateTimeFormat(TemporalConfig.Type type)StringgetDateTimeFormat12()StringgetDateTimeFormat24()StringgetDefaultDateFormat()StringgetDefaultDateTimeFormat()StringgetDefaultTimeFormat()LocalegetLocale()StringgetTimeFormat12()StringgetTimeFormat24()chargetTimeSeparator()
-
-
-
Field Detail
-
US_DATE_FORMAT
public static final String US_DATE_FORMAT
- See Also:
- Constant Field Values
-
US_TIME_FORMAT_12_FORMAT
public static final String US_TIME_FORMAT_12_FORMAT
- See Also:
- Constant Field Values
-
US_TIME_FORMAT_24_FORMAT
public static final String US_TIME_FORMAT_24_FORMAT
- See Also:
- Constant Field Values
-
US_LONG_DATE_FORMAT
public static final String US_LONG_DATE_FORMAT
- See Also:
- Constant Field Values
-
MEDIUM_DATE_FORMAT
public static final String MEDIUM_DATE_FORMAT
- See Also:
- Constant Field Values
-
MEDIUM_TIME_FORMAT
public static final String MEDIUM_TIME_FORMAT
- See Also:
- Constant Field Values
-
SHORT_TIME_FORMAT
public static final String SHORT_TIME_FORMAT
- See Also:
- Constant Field Values
-
US_TEMPORAL_CONFIG
public static final TemporalConfig US_TEMPORAL_CONFIG
default implementation which is configured for the US locale
-
-
Constructor Detail
-
TemporalConfig
public TemporalConfig(String dateFormat, String longDateFormat, String timeFormat12, String timeFormat24, char dateSeparator, char timeSeparator, Locale locale)
Instantiates a new TemporalConfig with the given configuration. Note that the date/time format variants will be created by concatenating the relevant date and time formats, separated by a single space, e.g. "<date> <time>".- Parameters:
dateFormat- the date (no time) formattimeFormat12- the 12 hour time formattimeFormat24- the 24 hour time formatdateSeparator- the primary separator used to separate elements in the date format. this is used to identify the components of date/time string.timeSeparator- the primary separator used to separate elements in the time format (both 12 hour and 24 hour). this is used to identify the components of a date/time string. This value should differ from the dateSeparator.
-
-
Method Detail
-
getLocale
public Locale getLocale()
-
getDateFormat
public String getDateFormat()
-
getTimeFormat12
public String getTimeFormat12()
-
getTimeFormat24
public String getTimeFormat24()
-
getDateTimeFormat12
public String getDateTimeFormat12()
-
getDateTimeFormat24
public String getDateTimeFormat24()
-
getDefaultDateFormat
public String getDefaultDateFormat()
-
getDefaultTimeFormat
public String getDefaultTimeFormat()
-
getDefaultDateTimeFormat
public String getDefaultDateTimeFormat()
-
getDateSeparator
public char getDateSeparator()
-
getTimeSeparator
public char getTimeSeparator()
-
getDateTimeFormat
public String getDateTimeFormat(TemporalConfig.Type type)
-
getAmPmStrings
public String[] getAmPmStrings()
-
-