com.google.gwt.i18n.client
Class DefaultDateTimeFormatInfo

java.lang.Object
  extended by com.google.gwt.i18n.client.DefaultDateTimeFormatInfo
All Implemented Interfaces:
DateTimeFormatInfo
Direct Known Subclasses:
DateTimeFormatInfoImpl

public class DefaultDateTimeFormatInfo
extends java.lang.Object
implements DateTimeFormatInfo

Default implementation of DateTimeFormatInfo interface, using values from the CLDR root locale.

Users who need to create their own DateTimeFormatInfo implementation are encouraged to extend this class so their implementation won't break when new methods are added.


Constructor Summary
DefaultDateTimeFormatInfo()
           
 
Method Summary
 java.lang.String[] ampms()
           
 java.lang.String dateFormat()
           
 java.lang.String dateFormatFull()
           
 java.lang.String dateFormatLong()
           
 java.lang.String dateFormatMedium()
           
 java.lang.String dateFormatShort()
           
 java.lang.String dateTime(java.lang.String timePattern, java.lang.String datePattern)
          Construct a date/time format from a date format pattern and a time format pattern, using the locale default joining.
 java.lang.String dateTimeFull(java.lang.String timePattern, java.lang.String datePattern)
          Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.
 java.lang.String dateTimeLong(java.lang.String timePattern, java.lang.String datePattern)
          Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.
 java.lang.String dateTimeMedium(java.lang.String timePattern, java.lang.String datePattern)
          Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.
 java.lang.String dateTimeShort(java.lang.String timePattern, java.lang.String datePattern)
          Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.
 java.lang.String[] erasFull()
           
 java.lang.String[] erasShort()
           
 int firstDayOfTheWeek()
           
 java.lang.String formatDay()
           
 java.lang.String formatHour12Minute()
           
 java.lang.String formatHour12MinuteSecond()
           
 java.lang.String formatHour24Minute()
           
 java.lang.String formatHour24MinuteSecond()
           
 java.lang.String formatMinuteSecond()
           
 java.lang.String formatMonthAbbrev()
           
 java.lang.String formatMonthAbbrevDay()
           
 java.lang.String formatMonthFull()
           
 java.lang.String formatMonthFullDay()
           
 java.lang.String formatMonthFullWeekdayDay()
           
 java.lang.String formatMonthNumDay()
           
 java.lang.String formatYear()
           
 java.lang.String formatYearMonthAbbrev()
           
 java.lang.String formatYearMonthAbbrevDay()
           
 java.lang.String formatYearMonthFull()
           
 java.lang.String formatYearMonthFullDay()
           
 java.lang.String formatYearMonthNum()
           
 java.lang.String formatYearMonthNumDay()
           
 java.lang.String formatYearMonthWeekdayDay()
           
 java.lang.String formatYearQuarterFull()
           
 java.lang.String formatYearQuarterShort()
           
 java.lang.String[] monthsFull()
           
 java.lang.String[] monthsFullStandalone()
           
 java.lang.String[] monthsNarrow()
           
 java.lang.String[] monthsNarrowStandalone()
           
 java.lang.String[] monthsShort()
           
 java.lang.String[] monthsShortStandalone()
           
 java.lang.String[] quartersFull()
           
 java.lang.String[] quartersShort()
           
 java.lang.String timeFormat()
           
 java.lang.String timeFormatFull()
           
 java.lang.String timeFormatLong()
           
 java.lang.String timeFormatMedium()
           
 java.lang.String timeFormatShort()
           
 java.lang.String[] weekdaysFull()
           
 java.lang.String[] weekdaysFullStandalone()
           
 java.lang.String[] weekdaysNarrow()
           
 java.lang.String[] weekdaysNarrowStandalone()
           
 java.lang.String[] weekdaysShort()
           
 java.lang.String[] weekdaysShortStandalone()
           
 int weekendEnd()
           
 int weekendStart()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDateTimeFormatInfo

public DefaultDateTimeFormatInfo()
Method Detail

ampms

public java.lang.String[] ampms()
Specified by:
ampms in interface DateTimeFormatInfo
Returns:
array of strings containing abbreviations for Ante Meridiem and Post Meridiem.

dateFormat

public java.lang.String dateFormat()
Specified by:
dateFormat in interface DateTimeFormatInfo
Returns:
a safe default date format.

dateFormatFull

public java.lang.String dateFormatFull()
Specified by:
dateFormatFull in interface DateTimeFormatInfo
Returns:
a "full" date format.

dateFormatLong

public java.lang.String dateFormatLong()
Specified by:
dateFormatLong in interface DateTimeFormatInfo
Returns:
a "long" date format.

dateFormatMedium

public java.lang.String dateFormatMedium()
Specified by:
dateFormatMedium in interface DateTimeFormatInfo
Returns:
a "medium" date format.

dateFormatShort

public java.lang.String dateFormatShort()
Specified by:
dateFormatShort in interface DateTimeFormatInfo
Returns:
a "short" date format.

dateTime

public java.lang.String dateTime(java.lang.String timePattern,
                                 java.lang.String datePattern)
Description copied from interface: DateTimeFormatInfo
Construct a date/time format from a date format pattern and a time format pattern, using the locale default joining.

Specified by:
dateTime in interface DateTimeFormatInfo
Returns:
a date/time format

dateTimeFull

public java.lang.String dateTimeFull(java.lang.String timePattern,
                                     java.lang.String datePattern)
Description copied from interface: DateTimeFormatInfo
Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.

Specified by:
dateTimeFull in interface DateTimeFormatInfo
Returns:
a date/time format

dateTimeLong

public java.lang.String dateTimeLong(java.lang.String timePattern,
                                     java.lang.String datePattern)
Description copied from interface: DateTimeFormatInfo
Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.

Specified by:
dateTimeLong in interface DateTimeFormatInfo
Returns:
a date/time format

dateTimeMedium

public java.lang.String dateTimeMedium(java.lang.String timePattern,
                                       java.lang.String datePattern)
Description copied from interface: DateTimeFormatInfo
Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.

Specified by:
dateTimeMedium in interface DateTimeFormatInfo
Returns:
a date/time format

dateTimeShort

public java.lang.String dateTimeShort(java.lang.String timePattern,
                                      java.lang.String datePattern)
Description copied from interface: DateTimeFormatInfo
Construct a date/time format from a date format pattern and a time format pattern, using "full" joining.

Specified by:
dateTimeShort in interface DateTimeFormatInfo
Returns:
a date/time format

erasFull

public java.lang.String[] erasFull()
Specified by:
erasFull in interface DateTimeFormatInfo
Returns:
an array of the full era names.

erasShort

public java.lang.String[] erasShort()
Specified by:
erasShort in interface DateTimeFormatInfo
Returns:
abbreviations of the era names.

firstDayOfTheWeek

public int firstDayOfTheWeek()
Specified by:
firstDayOfTheWeek in interface DateTimeFormatInfo
Returns:
the day which generally comes first in a weekly calendar view, as an index into the return value of DateTimeFormatInfo.weekdaysFull().

formatDay

public java.lang.String formatDay()
Specified by:
formatDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "d" skeleton pattern.

formatHour12Minute

public java.lang.String formatHour12Minute()
Specified by:
formatHour12Minute in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "hm" skeleton pattern.

formatHour12MinuteSecond

public java.lang.String formatHour12MinuteSecond()
Specified by:
formatHour12MinuteSecond in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "hms" skeleton pattern.

formatHour24Minute

public java.lang.String formatHour24Minute()
Specified by:
formatHour24Minute in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "Hm" skeleton pattern.

formatHour24MinuteSecond

public java.lang.String formatHour24MinuteSecond()
Specified by:
formatHour24MinuteSecond in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "Hms" skeleton pattern.

formatMinuteSecond

public java.lang.String formatMinuteSecond()
Specified by:
formatMinuteSecond in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "ms" skeleton pattern.

formatMonthAbbrev

public java.lang.String formatMonthAbbrev()
Specified by:
formatMonthAbbrev in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "MMM" skeleton pattern.

formatMonthAbbrevDay

public java.lang.String formatMonthAbbrevDay()
Specified by:
formatMonthAbbrevDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "MMMd" skeleton pattern.

formatMonthFull

public java.lang.String formatMonthFull()
Specified by:
formatMonthFull in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "MMMM" skeleton pattern.

formatMonthFullDay

public java.lang.String formatMonthFullDay()
Specified by:
formatMonthFullDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "MMMMd" skeleton pattern.

formatMonthFullWeekdayDay

public java.lang.String formatMonthFullWeekdayDay()
Specified by:
formatMonthFullWeekdayDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "MMMMEEEEd" skeleton pattern.

formatMonthNumDay

public java.lang.String formatMonthNumDay()
Specified by:
formatMonthNumDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "Md" skeleton pattern.

formatYear

public java.lang.String formatYear()
Specified by:
formatYear in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "y" skeleton pattern.

formatYearMonthAbbrev

public java.lang.String formatYearMonthAbbrev()
Specified by:
formatYearMonthAbbrev in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yMMM" skeleton pattern.

formatYearMonthAbbrevDay

public java.lang.String formatYearMonthAbbrevDay()
Specified by:
formatYearMonthAbbrevDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yMMMd" skeleton pattern.

formatYearMonthFull

public java.lang.String formatYearMonthFull()
Specified by:
formatYearMonthFull in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yMMMM" skeleton pattern.

formatYearMonthFullDay

public java.lang.String formatYearMonthFullDay()
Specified by:
formatYearMonthFullDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yMMMMd" skeleton pattern.

formatYearMonthNum

public java.lang.String formatYearMonthNum()
Specified by:
formatYearMonthNum in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yM" skeleton pattern.

formatYearMonthNumDay

public java.lang.String formatYearMonthNumDay()
Specified by:
formatYearMonthNumDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yMd" skeleton pattern.

formatYearMonthWeekdayDay

public java.lang.String formatYearMonthWeekdayDay()
Specified by:
formatYearMonthWeekdayDay in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yMMMEEEd" skeleton pattern.

formatYearQuarterFull

public java.lang.String formatYearQuarterFull()
Specified by:
formatYearQuarterFull in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yQQQQ" skeleton pattern.

formatYearQuarterShort

public java.lang.String formatYearQuarterShort()
Specified by:
formatYearQuarterShort in interface DateTimeFormatInfo
Returns:
localized format equivalent to the "yQ" skeleton pattern.

monthsFull

public java.lang.String[] monthsFull()
Specified by:
monthsFull in interface DateTimeFormatInfo
Returns:
an array of full month names.

monthsFullStandalone

public java.lang.String[] monthsFullStandalone()
Specified by:
monthsFullStandalone in interface DateTimeFormatInfo
Returns:
an array of month names for use in a stand-alone context.

monthsNarrow

public java.lang.String[] monthsNarrow()
Specified by:
monthsNarrow in interface DateTimeFormatInfo
Returns:
an array of the shortest abbreviations for months, typically a single character and not guaranteed to be unique.

monthsNarrowStandalone

public java.lang.String[] monthsNarrowStandalone()
Specified by:
monthsNarrowStandalone in interface DateTimeFormatInfo
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

public java.lang.String[] monthsShort()
Specified by:
monthsShort in interface DateTimeFormatInfo
Returns:
an array of month abbreviations.

monthsShortStandalone

public java.lang.String[] monthsShortStandalone()
Specified by:
monthsShortStandalone in interface DateTimeFormatInfo
Returns:
an array of month abbreviations, suitable for use in a stand-alone context.

quartersFull

public java.lang.String[] quartersFull()
Specified by:
quartersFull in interface DateTimeFormatInfo
Returns:
an array of full quarter names.

quartersShort

public java.lang.String[] quartersShort()
Specified by:
quartersShort in interface DateTimeFormatInfo
Returns:
an array of abbreviations for quarters.

timeFormat

public java.lang.String timeFormat()
Specified by:
timeFormat in interface DateTimeFormatInfo
Returns:
a safe default time format.

timeFormatFull

public java.lang.String timeFormatFull()
Specified by:
timeFormatFull in interface DateTimeFormatInfo
Returns:
a "full" time format.

timeFormatLong

public java.lang.String timeFormatLong()
Specified by:
timeFormatLong in interface DateTimeFormatInfo
Returns:
a "long" time format.

timeFormatMedium

public java.lang.String timeFormatMedium()
Specified by:
timeFormatMedium in interface DateTimeFormatInfo
Returns:
a "medium" time format.

timeFormatShort

public java.lang.String timeFormatShort()
Specified by:
timeFormatShort in interface DateTimeFormatInfo
Returns:
a "short" time format.

weekdaysFull

public java.lang.String[] weekdaysFull()
Specified by:
weekdaysFull in interface DateTimeFormatInfo
Returns:
an array of the full names of weekdays.

weekdaysFullStandalone

public java.lang.String[] weekdaysFullStandalone()
Specified by:
weekdaysFullStandalone in interface DateTimeFormatInfo
Returns:
an array of the full names of weekdays, suitable for use in a stand-alone context.

weekdaysNarrow

public java.lang.String[] weekdaysNarrow()
Specified by:
weekdaysNarrow in interface DateTimeFormatInfo
Returns:
an array of the shortest abbreviations for weekdays, typically a single character and not guaranteed to be unique.

weekdaysNarrowStandalone

public java.lang.String[] weekdaysNarrowStandalone()
Specified by:
weekdaysNarrowStandalone in interface DateTimeFormatInfo
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

public java.lang.String[] weekdaysShort()
Specified by:
weekdaysShort in interface DateTimeFormatInfo
Returns:
an array of abbreviations for weekdays.

weekdaysShortStandalone

public java.lang.String[] weekdaysShortStandalone()
Specified by:
weekdaysShortStandalone in interface DateTimeFormatInfo
Returns:
an array of abbreviations for weekdays, suitable for use in a stand-alone context.

weekendEnd

public int weekendEnd()
Specified by:
weekendEnd in interface DateTimeFormatInfo
Returns:
the day which starts the weekend, as an index into the return value of DateTimeFormatInfo.weekdaysFull().

weekendStart

public int weekendStart()
Specified by:
weekendStart in interface DateTimeFormatInfo
Returns:
the day which ends the weekend, as an index into the return value of DateTimeFormatInfo.weekdaysFull(). Note that this value may be numerically less than DateTimeFormatInfo.weekendEnd() - for example, DateTimeFormatInfo.weekendEnd() of 6 and DateTimeFormatInfo.weekendStart() of 0 means Saturday and Sunday are the weekend.