new TimeZoneDatabase()
Queries the time zone database from the station.
There is no reason to call this constructor directly; rather use the
static accessor functions.
Methods
-
<static> get(callbacks)
-
Asynchronously retrieve the time zone database from the station. The
network call to the station will only happen once: the same database
instance will be resolved no matter how many times this function is called.Parameters:
Name Type Description callbacksObject Properties
Name Type Argument Description okfunction ok callback, will receive a
TimeZoneDatabaseinstance populated with data retrieved from the stationfailfunction fail callback
batchbaja.comm.Batch <optional>
batch to use for the network
requestReturns:
- Type
- Promise
-
getAllSupportedZoneIds()
-
Return all time zone IDs the station knows about.
Returns:
- Type
- Array.<String>
-
getTimeZone(id)
-
Return the
TimeZoneinstance corresponding to the given ID.Parameters:
Name Type Description idString Returns:
the time zone, or
nullif not found- Type
- baja.TimeZone
-
getTimeZones()
-
Return all
TimeZoneinstances the station knows about.Returns:
- Type
- Array.<baja.TimeZone>
-
isZoneIdSupported(id)
-
Return true if the station knows about the given time zone ID.
Parameters:
Name Type Description idstring Returns:
- Type
- boolean