Interface DateTimeFormatInfo

All Known Subinterfaces:
DateTimeFormatInfo
All Known Implementing Classes:
DateTimeFormatInfoAdapter, DefaultDateTimeFormatInfo, DefaultDateTimeFormatInfo

public interface DateTimeFormatInfo
Information required for formatting and parsing localized date/time values.

Implementors should subclass DefaultDateTimeFormatInfo so when methods are added they will get reasonable defaults and not break. See the same class for example values returned by these methods.

  • Method Details

    • ampms

      String[] ampms()
      Returns array of strings containing abbreviations for Ante Meridiem and Post Meridiem.
    • dateFormat

      String dateFormat()
      Returns a safe default date format.
    • dateFormatFull

      String dateFormatFull()
      Returns a "full" date format.
    • dateFormatLong

      String dateFormatLong()
      Returns a "long" date format.
    • dateFormatMedium

      String dateFormatMedium()
      Returns a "medium" date format.
    • dateFormatShort

      String dateFormatShort()
      Returns a "short" date format.
    • dateTime

      String dateTime(String timePattern, String datePattern)
      Returns a date/time format from a date format pattern and a time format pattern, using the locale default joining.
      Parameters:
      timePattern - the time pattern String
      datePattern - the data pattern String
    • dateTimeFull

      String dateTimeFull(String timePattern, String datePattern)
      Returns a date/time format from a date format pattern and a time format pattern, using "full" joining.
      Parameters:
      timePattern - the time pattern String
      datePattern - the data pattern String
    • dateTimeLong

      String dateTimeLong(String timePattern, String datePattern)
      Returns a date/time format from a date format pattern and a time format pattern, using "full" joining.
      Parameters:
      timePattern - the time pattern String
      datePattern - the data pattern String
    • dateTimeMedium

      String dateTimeMedium(String timePattern, String datePattern)
      Returns a date/time format from a date format pattern and a time format pattern, using "full" joining.
      Parameters:
      timePattern - the time pattern String
      datePattern - the data pattern String
    • dateTimeShort

      String dateTimeShort(String timePattern, String datePattern)
      Returns a date/time format from a date format pattern and a time format pattern, using "full" joining.
      Parameters:
      timePattern - the time pattern String
      datePattern - the data pattern String
    • erasFull

      String[] erasFull()
      Returns an array of the full era names.
    • erasShort

      String[] erasShort()
      Returns abbreviations of the era names.
    • firstDayOfTheWeek

      int firstDayOfTheWeek()
      Returns the day which generally comes first in a weekly calendar view, as an index into the return value of weekdaysFull().
    • formatDay

      String formatDay()
      Returns localized format equivalent to the "d" skeleton pattern.
    • formatHour12Minute

      String formatHour12Minute()
      Returns localized format equivalent to the "hm" skeleton pattern.
    • formatHour12MinuteSecond

      String formatHour12MinuteSecond()
      Returns localized format equivalent to the "hms" skeleton pattern.
    • formatHour24Minute

      String formatHour24Minute()
      Returns localized format equivalent to the "Hm" skeleton pattern.
    • formatHour24MinuteSecond

      String formatHour24MinuteSecond()
      Returns localized format equivalent to the "Hms" skeleton pattern.
    • formatMinuteSecond

      String formatMinuteSecond()
      Returns localized format equivalent to the "ms" skeleton pattern.
    • formatMonthAbbrev

      String formatMonthAbbrev()
      Returns localized format equivalent to the "MMM" skeleton pattern.
    • formatMonthAbbrevDay

      String formatMonthAbbrevDay()
      Returns localized format equivalent to the "MMMd" skeleton pattern.
    • formatMonthFull

      String formatMonthFull()
      Returns localized format equivalent to the "MMMM" skeleton pattern.
    • formatMonthFullDay

      String formatMonthFullDay()
      Returns localized format equivalent to the "MMMMd" skeleton pattern.
    • formatMonthFullWeekdayDay

      String formatMonthFullWeekdayDay()
      Returns localized format equivalent to the "MMMMEEEEd" skeleton pattern.
    • formatMonthNumDay

      String formatMonthNumDay()
      Returns localized format equivalent to the "Md" skeleton pattern.
    • formatYear

      String formatYear()
      Returns localized format equivalent to the "y" skeleton pattern.
    • formatYearMonthAbbrev

      String formatYearMonthAbbrev()
      Returns localized format equivalent to the "yMMM" skeleton pattern.
    • formatYearMonthAbbrevDay

      String formatYearMonthAbbrevDay()
      Returns localized format equivalent to the "yMMMd" skeleton pattern.
    • formatYearMonthFull

      String formatYearMonthFull()
      Returns localized format equivalent to the "yMMMM" skeleton pattern.
    • formatYearMonthFullDay

      String formatYearMonthFullDay()
      Returns localized format equivalent to the "yMMMMd" skeleton pattern.
    • formatYearMonthNum

      String formatYearMonthNum()
      Returns localized format equivalent to the "yM" skeleton pattern.
    • formatYearMonthNumDay

      String formatYearMonthNumDay()
      Returns localized format equivalent to the "yMd" skeleton pattern.
    • formatYearMonthWeekdayDay

      String formatYearMonthWeekdayDay()
      Returns localized format equivalent to the "yMMMEEEd" skeleton pattern.
    • formatYearQuarterFull

      String formatYearQuarterFull()
      Returns localized format equivalent to the "yQQQQ" skeleton pattern.
    • formatYearQuarterShort

      String formatYearQuarterShort()
      Returns localized format equivalent to the "yQ" skeleton pattern.
    • monthsFull

      String[] monthsFull()
      Returns an array of full month names.
    • monthsFullStandalone

      String[] monthsFullStandalone()
      Returns an array of month names for use in a stand-alone context.
    • monthsNarrow

      String[] monthsNarrow()
      Returns an array of the shortest abbreviations for months, typically a single character and not guaranteed to be unique.
    • monthsNarrowStandalone

      String[] monthsNarrowStandalone()
      Returns an array of the shortest abbreviations for months suitable for use in a stand-alone context, typically a single character and not guaranteed to be unique.
    • monthsShort

      String[] monthsShort()
      Returns an array of month abbreviations.
    • monthsShortStandalone

      String[] monthsShortStandalone()
      Returns an array of month abbreviations, suitable for use in a stand-alone context.
    • quartersFull

      String[] quartersFull()
      Returns an array of full quarter names.
    • quartersShort

      String[] quartersShort()
      Returns an array of abbreviations for quarters.
    • timeFormat

      String timeFormat()
      Returns a safe default time format.
    • timeFormatFull

      String timeFormatFull()
      Returns a "full" time format.
    • timeFormatLong

      String timeFormatLong()
      Returns a "long" time format.
    • timeFormatMedium

      String timeFormatMedium()
      Returns a "medium" time format.
    • timeFormatShort

      String timeFormatShort()
      Returns a "short" time format.
    • weekdaysFull

      String[] weekdaysFull()
      Returns an array of the full names of weekdays.
    • weekdaysFullStandalone

      String[] weekdaysFullStandalone()
      Returns an array of the full names of weekdays, suitable for use in a stand-alone context.
    • weekdaysNarrow

      String[] weekdaysNarrow()
      Returns an array of the shortest abbreviations for weekdays, typically a single character and not guaranteed to be unique.
    • weekdaysNarrowStandalone

      String[] weekdaysNarrowStandalone()
      Returns an array of the shortest abbreviations for weekdays suitable for use in a stand-alone context, typically a single character and not guaranteed to be unique.
    • weekdaysShort

      String[] weekdaysShort()
      Returns an array of abbreviations for weekdays.
    • weekdaysShortStandalone

      String[] weekdaysShortStandalone()
      Returns an array of abbreviations for weekdays, suitable for use in a stand-alone context.
    • weekendEnd

      int weekendEnd()
      Returns the day which ends the weekend, as an index into the return value of weekdaysFull().

      Note that this value may be numerically less than weekendStart() - for example, weekendStart() of 6 and weekendEnd() of 0 means Saturday and Sunday are the weekend.

    • weekendStart

      int weekendStart()
      Returns the day which starts the weekend, as an index into the return value of weekdaysFull().