public class TemporalConfig extends Object
US_TEMPORAL_CONFIG
instance 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.Modifier and Type | Class and Description |
---|---|
static class |
TemporalConfig.Type |
Modifier and Type | Field and Description |
---|---|
static String |
MEDIUM_DATE_FORMAT |
static String |
MEDIUM_TIME_FORMAT |
static String |
SHORT_TIME_FORMAT |
static String |
US_DATE_FORMAT |
static String |
US_LONG_DATE_FORMAT |
static TemporalConfig |
US_TEMPORAL_CONFIG
default implementation which is configured for the US locale
|
static String |
US_TIME_FORMAT_12_FORMAT |
static String |
US_TIME_FORMAT_24_FORMAT |
Constructor and Description |
---|
TemporalConfig(String dateFormat,
String longDateFormat,
String timeFormat12,
String timeFormat24,
char dateSeparator,
char timeSeparator,
Locale locale)
Instantiates a new TemporalConfig with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getAmPmStrings() |
String |
getDateFormat() |
char |
getDateSeparator() |
String |
getDateTimeFormat(TemporalConfig.Type type) |
String |
getDateTimeFormat12() |
String |
getDateTimeFormat24() |
String |
getDefaultDateFormat() |
String |
getDefaultDateTimeFormat() |
String |
getDefaultTimeFormat() |
Locale |
getLocale() |
String |
getTimeFormat12() |
String |
getTimeFormat24() |
char |
getTimeSeparator() |
public static final String US_DATE_FORMAT
public static final String US_TIME_FORMAT_12_FORMAT
public static final String US_TIME_FORMAT_24_FORMAT
public static final String US_LONG_DATE_FORMAT
public static final String MEDIUM_DATE_FORMAT
public static final String MEDIUM_TIME_FORMAT
public static final String SHORT_TIME_FORMAT
public static final TemporalConfig US_TEMPORAL_CONFIG
public TemporalConfig(String dateFormat, String longDateFormat, String timeFormat12, String timeFormat24, char dateSeparator, char timeSeparator, Locale locale)
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.public Locale getLocale()
public String getDateFormat()
public String getTimeFormat12()
public String getTimeFormat24()
public String getDateTimeFormat12()
public String getDateTimeFormat24()
public String getDefaultDateFormat()
public String getDefaultTimeFormat()
public String getDefaultDateTimeFormat()
public char getDateSeparator()
public char getTimeSeparator()
public String getDateTimeFormat(TemporalConfig.Type type)
public String[] getAmPmStrings()
Copyright © 2005–2024 OpenHMS. All rights reserved.