goog.i18n.DateTimeFormat |
pattern
: string | number
pattern specification or pattern type.
|
opt_dateTimeSymbols
: !Object=
Optional symbols to use use for this
instance rather than the global symbols.
|
![]()
Apply specified pattern to this formatter object.
Arguments:
|
code » | ||||||
![]()
Apply a predefined pattern as identified by formatType, which is stored in
locale specific repository.
Arguments:
|
code » | ||||||
Format the given date object according to preset pattern and current lcoale.
Arguments:
Returns: string
Formatted string for the given date.
Throws an error if the date is null or if one tries to format a date-only
object (for instance goog.date.Date) using a pattern with time fields.
|
code » | ||||||
Formats (0..11) Hours field according to pattern specified
|
code » | ||||||
Formats (0..23) Hours field according to pattern specified
|
code » | ||||||
Formats (1..12) Hours field according to pattern specified
|
code » | ||||||
Formats (1..24) Hours field according to pattern specified
|
code » | ||||||
Formats Am/Pm field according to pattern specified
|
code » | ||||||
Formats Date field according to pattern specified
|
code » | ||||||
Formats Day of week field according to pattern specified
|
code » | ||||||
Formats Era field according to pattern specified.
|
code » | ||||||
Formatting one date field.
Arguments:
Returns: string
string representation for the given field.
|
code » | ||||||
Formats Fractional seconds field according to pattern
specified
|
code » | ||||||
Formats Minutes field according to pattern specified
|
code » | ||||||
Formats Month field according to pattern specified
|
code » | ||||||
Formats Quarter field according to pattern specified
|
code » | ||||||
Formats Seconds field according to pattern specified
|
code » | ||||||
Formats Standalone weekday field according to pattern specified
|
code » | ||||||
Formats Standalone Month field according to pattern specified
|
code » | ||||||
Generate GMT timeZone string for given date
Arguments:
Returns: string
GMT timeZone string.
|
code » | ||||||
Formats TimeZone field following RFC
Arguments:
Returns: string
Formatted string that represent this field.
|
code » | ||||||
Generate GMT timeZone string for given date
|
code » | ||||||
Formats the week of year field according to pattern specified
|
code » | ||||||
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.
|
code » | ||||||
Localizes a string potentially containing numbers, replacing ASCII digits
with native digits if specified so by the locale. Leaves other characters.
|
code » |
Localizes a string potentially containing numbers, replacing ASCII digits
with native digits if specified so by the locale. Leaves other characters.
|
code » | ||
![]()
Validates is the goog.date.DateLike object to format has a time.
DateLike means Date|goog.date.Date, and goog.date.DateTime inherits
from goog.date.Date. But goog.date.Date does not have time related
members (getHours, getMinutes, getSeconds).
Formatting can be done, if there are no time placeholders in the pattern.
Arguments:
|
code » |
![]()
regular expression pattern for parsing pattern string
|
Code » |
![]()
Enum to identify predefined Date/Time format pattern.
Constants:
|
Code » | |||||||||||||
![]()
These are token types, corresponding to above token definitions.
Constants:
|
Code » |