timezone.js
Functions to provide timezone information for use with date/time format.

File Location

i18n/timezone.js

Classes

goog.i18n.TimeZone
TimeZone class implemented a time zone resolution and name information source for client applications. The time zone object is initiated from a time zone information object. Application can initiate a time zone statically, or it may choose to initiate from a data obtained from server. Each time zone information array is small, but the whole set of data is too much for client application to download. If end user is allowed to change time zone setting, dynamic retrieval should be the method to use. In case only time zone offset is known, there is a decent fallback that only use the time zone offset to create a TimeZone object. A whole set of time zone information array was available under http://go/js_locale_data. It is generated based on CLDR and Olson time zone data base (through pytz), and will be updated timely.

Public Protected Private

Global Functions

goog.i18n.TimeZone.composeGMTString_(offset)
Generate GMT string given a time zone offset.
Arguments:
offset :
time zone offset in minutes.
Returns:   GMT string for this offset.
code »
goog.i18n.TimeZone.composePosixTimeZoneID_(offset)
POSIX time zone ID as fallback.
Arguments:
offset :
time zone offset in minutes.
Returns:   posix time zone id for given offset.
code »
goog.i18n.TimeZone.composeUTCString_(offset)
Generate UTC string.
Arguments:
offset :
time zone offset in minutes.
Returns:   UTC string for given offset.
code »
goog.i18n.TimeZone.createSimpleTimeZone_(timeZoneOffsetInMinutes)
This factory method provides a decent fallback to create a time zone object just based on a given time zone offset.
Arguments:
timeZoneOffsetInMinutes :
time zone offset in minutes.
Returns:   A goog.i18n.TimeZone object generated by just using the time zone offset information.
code »
goog.i18n.TimeZone.createTimeZone(timeZoneData)
This factory method creates a time zone instance. It takes either a time zone information array or a simple timezone offset. The latter form does not offer the same set of functionalities as first form.
Arguments:
timeZoneData :
this parameter could take 2 types, if it is a number, a simple TimeZone object will be created. Otherwise, it should be an Object that holds all time zone related information.
Returns:   A goog.i18n.TimeZone object for the given time zone data.
code »

Global Properties

goog.i18n.TimeZone.MILLISECONDS_PER_HOUR_ :
Milliseconds per hour constant.
Code »

Directory i18n

File Reference