locale.timeZoneDetection

Classes


Public Protected Private

Global Functions

goog.locale.timeZoneDetection.detectTimeZone(opt_countryopt_date) string
Detects browser's time zone setting. If user's country is known, a better time zone choice could be guessed.
Arguments:
opt_country : string=
Two-letter ISO 3166 country code.
opt_date : Date=
Date for calculating the fingerprint. Defaults to the current date.
Returns: string  Time zone ID of best guess.
code »
goog.locale.timeZoneDetection.getFingerprint(date) number
Calculates time zone fingerprint by poking time zone offsets for 13 preselected time points. See goog.locale.timeZoneDetection.TZ_POKE_POINTS_
Arguments:
date : Date
Date for calculating the fingerprint.
Returns: number  Fingerprint of user's time zone setting.
code »
goog.locale.timeZoneDetection.getTimeZoneList(opt_countryopt_date) !Array.<string>
Returns an array of time zones that are consistent with user's platform setting. If user's country is given, only the time zone for that country is returned.
Arguments:
opt_country : string=
2 letter ISO 3166 country code. Helps in making a better guess for user's time zone.
opt_date : Date=
Date for retrieving timezone list. Defaults to the current date.
Returns: !Array.<string>  Array of time zone IDs.
code »

Global Properties

goog.locale.timeZoneDetection.TZ_POKE_POINTS_ :
Array of time instances for checking the time zone offset.
Code »

Package locale

Package Reference