APIdia Launch Partner
Top Description Inners Fields Constructors Methods
io.github.spannm.jackcess.expr

public Class TemporalConfig

extends Object
Class Inheritance
Imports
io.github.spannm.jackcess.JackcessRuntimeException, java.text.DateFormatSymbols, java.util.Locale

A TemporalConfig encapsulates date/time formatting options for expression evaluation. The default 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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final String[]
private final String
private final char
private final String
private final String
public static final String
public static final String
private final Locale
private final String
private final String
private final String
private final char
public static final String
public static final String
public static final String
public static final TemporalConfig
US_TEMPORAL_CONFIG

default implementation which is configured for the US locale

public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public
TemporalConfig(String
the date (no time) format
_dateFormat
,
String _longDateFormat, String
the 12 hour time format
_timeFormat12
,
String
the 24 hour time format
_timeFormat24
,
char
the primary separator used to separate elements in the date format. this is used to identify the components of date/time string.
_dateSeparator
,
char
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.
_timeSeparator
,
Locale _locale)

Instantiates a new TemporalConfig with the given configuration.

Method Summary

Modifier and TypeMethod and Description
public String[]
public String
public char
public String
public String
public String
public String
public String
public String
public Locale
protected String
protected String
protected String
protected String
public String
public String
public char
private static String
toDateTimeFormat(String dateFormat, String timeFormat)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mamPmStringsback to summary
private final String[] mamPmStrings
mdateFormatback to summary
private final String mdateFormat
mdateSeparatorback to summary
private final char mdateSeparator
mdateTimeFormat12back to summary
private final String mdateTimeFormat12
mdateTimeFormat24back to summary
private final String mdateTimeFormat24
MEDIUM_DATE_FORMATback to summary
public static final String MEDIUM_DATE_FORMAT
MEDIUM_TIME_FORMATback to summary
public static final String MEDIUM_TIME_FORMAT
mlocaleback to summary
private final Locale mlocale
mlongDateFormatback to summary
private final String mlongDateFormat
mtimeFormat12back to summary
private final String mtimeFormat12
mtimeFormat24back to summary
private final String mtimeFormat24
mtimeSeparatorback to summary
private final char mtimeSeparator
SHORT_TIME_FORMATback to summary
public static final String SHORT_TIME_FORMAT
US_DATE_FORMATback to summary
public static final String US_DATE_FORMAT
US_LONG_DATE_FORMATback to summary
public static final String US_LONG_DATE_FORMAT
US_TEMPORAL_CONFIGback to summary
public static final TemporalConfig US_TEMPORAL_CONFIG

default implementation which is configured for the US locale

US_TIME_FORMAT_12_FORMATback to summary
public static final String US_TIME_FORMAT_12_FORMAT
US_TIME_FORMAT_24_FORMATback to summary
public static final String US_TIME_FORMAT_24_FORMAT

Constructor Detail

TemporalConfigback to summary
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:String

the date (no time) format

_timeFormat12:String

the 12 hour time format

_timeFormat24:String

the 24 hour time format

_dateSeparator:char

the primary separator used to separate elements in the date format. this is used to identify the components of date/time string.

_timeSeparator:char

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

getAmPmStringsback to summary
public String[] getAmPmStrings()
getDateFormatback to summary
public String getDateFormat()
getDateSeparatorback to summary
public char getDateSeparator()
getDateTimeFormatback to summary
public String getDateTimeFormat(TemporalConfig.Type type)
getDateTimeFormat12back to summary
public String getDateTimeFormat12()
getDateTimeFormat24back to summary
public String getDateTimeFormat24()
getDefaultDateFormatback to summary
public String getDefaultDateFormat()
getDefaultDateTimeFormatback to summary
public String getDefaultDateTimeFormat()
getDefaultTimeFormatback to summary
public String getDefaultTimeFormat()
getLocaleback to summary
public Locale getLocale()
getLongDateFormatback to summary
protected String getLongDateFormat()
getMediumDateFormatback to summary
protected String getMediumDateFormat()
getMediumTimeFormatback to summary
protected String getMediumTimeFormat()
getShortTimeFormatback to summary
protected String getShortTimeFormat()
getTimeFormat12back to summary
public String getTimeFormat12()
getTimeFormat24back to summary
public String getTimeFormat24()
getTimeSeparatorback to summary
public char getTimeSeparator()
toDateTimeFormatback to summary
private static String toDateTimeFormat(String dateFormat, String timeFormat)
io.github.spannm.jackcess.expr back to summary

public final Enum TemporalConfig.Type

extends Enum<TemporalConfig.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type
public static final TemporalConfig.Type

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public TemporalConfig.Type
public Value.Type
public boolean
public boolean
public boolean
public boolean
public static TemporalConfig.Type
public static TemporalConfig.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DATEback to summary
public static final TemporalConfig.Type DATE
DATE_TIMEback to summary
public static final TemporalConfig.Type DATE_TIME
DATE_TIME_12back to summary
public static final TemporalConfig.Type DATE_TIME_12
DATE_TIME_24back to summary
public static final TemporalConfig.Type DATE_TIME_24
GENERAL_DATEback to summary
public static final TemporalConfig.Type GENERAL_DATE
LONG_DATEback to summary
public static final TemporalConfig.Type LONG_DATE
LONG_TIMEback to summary
public static final TemporalConfig.Type LONG_TIME
MEDIUM_DATEback to summary
public static final TemporalConfig.Type MEDIUM_DATE
MEDIUM_TIMEback to summary
public static final TemporalConfig.Type MEDIUM_TIME
SHORT_DATEback to summary
public static final TemporalConfig.Type SHORT_DATE
SHORT_TIMEback to summary
public static final TemporalConfig.Type SHORT_TIME
TIMEback to summary
public static final TemporalConfig.Type TIME
TIME_12back to summary
public static final TemporalConfig.Type TIME_12
TIME_24back to summary
public static final TemporalConfig.Type TIME_24

Constructor Detail

Typeback to summary
private Type()

Method Detail

getDefaultTypeback to summary
public TemporalConfig.Type getDefaultType()
getValueTypeback to summary
public Value.Type getValueType()
includesDateback to summary
public boolean includesDate()
includesTimeback to summary
public boolean includesTime()
isDateOnlyback to summary
public boolean isDateOnly()
isTimeOnlyback to summary
public boolean isTimeOnly()
valueOfback to summary
public static TemporalConfig.Type valueOf(String name)
valuesback to summary
public static TemporalConfig.Type[] values()