Home

Class goog.i18n.DateTimeFormat

Construct a DateTimeFormat object based on current locale.

Instance Method Summary
applyPattern_(string pattern)

Apply specified pattern to this formatter object.

applyStandardPattern_(number formatType)

Apply a predefined pattern as identified by formatType, which is stored in locale specific repository.

format(?goog.date.DateLike date, ?goog.i18n.TimeZone= opt_timeZone) ⇒ string

Format the given date object according to preset pattern and current lcoale.

format0To11Hours_(number count, ?goog.date.DateLike date) ⇒ string

Formats (0..11) Hours field according to pattern specified

format0To23Hours_(number count, ?goog.date.DateLike date) ⇒ string

Formats (0..23) Hours field according to pattern specified

format1To12Hours_(number count, ?goog.date.DateLike date) ⇒ string

Formats (1..12) Hours field according to pattern specified

format24Hours_(number count, ?goog.date.DateLike date) ⇒ string

Formats (1..24) Hours field according to pattern specified

formatAmPm_(number count, ?goog.date.DateLike date) ⇒ string

Formats Am/Pm field according to pattern specified

formatDate_(number count, ?goog.date.DateLike date) ⇒ string

Formats Date field according to pattern specified

formatDayOfWeek_(number count, ?goog.date.DateLike date) ⇒ string

Formats Day of week field according to pattern specified

formatEra_(number count, ?goog.date.DateLike date) ⇒ string

Formats Era field according to pattern specified.

formatField_(string patternStr, ?goog.date.DateLike date, ?goog.date.DateLike dateForDate, ?goog.date.DateLike dateForTime, ?goog.i18n.TimeZone= opt_timeZone) ⇒ string

Formatting one date field.

formatFractionalSeconds_(number count, ?goog.date.DateLike date) ⇒ string

Formats Fractional seconds field according to pattern specified

formatMinutes_(number count, ?goog.date.DateLike date) ⇒ string

Formats Minutes field according to pattern specified

formatMonth_(number count, ?goog.date.DateLike date) ⇒ string

Formats Month field according to pattern specified

formatQuarter_(number count, ?goog.date.DateLike date) ⇒ string

Formats Quarter field according to pattern specified

formatSeconds_(number count, ?goog.date.DateLike date) ⇒ string

Formats Seconds field according to pattern specified

formatStandaloneDay_(number count, ?goog.date.DateLike date) ⇒ string

Formats Standalone weekday field according to pattern specified

formatStandaloneMonth_(number count, ?goog.date.DateLike date) ⇒ string

Formats Standalone Month field according to pattern specified

formatTimeZoneId_(?goog.date.DateLike date, ?goog.i18n.TimeZone= opt_timeZone) ⇒ string

Generate GMT timeZone string for given date

formatTimeZoneRFC_(number count, ?goog.date.DateLike date, ?goog.i18n.TimeZone= opt_timeZone) ⇒ string

Formats TimeZone field following RFC

formatTimeZone_(number count, ?goog.date.DateLike date, ?goog.i18n.TimeZone= opt_timeZone) ⇒ string

Generate GMT timeZone string for given date

formatYear_(number count, ?goog.date.DateLike date) ⇒ string

Formats Year field according to pattern specified Javascript Date object seems incapable handling 1BC and year before. It can show you year 0 which does not exists. following we just keep consistent with javascript's toString method. But keep in mind those things should be unsupported.