Class TemporalConfig


  • public class TemporalConfig
    extends Object
    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.
    Author:
    James Ahlborn
    • 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) format
        timeFormat12 - the 12 hour time format
        timeFormat24 - the 24 hour time format
        dateSeparator - 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()
      • getAmPmStrings

        public String[] getAmPmStrings()