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 callbacks
Object Properties
Name Type Argument Description ok
function ok callback, will receive a
TimeZoneDatabase
instance populated with data retrieved from the stationfail
function fail callback
batch
baja.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
TimeZone
instance corresponding to the given ID.Parameters:
Name Type Description id
String Returns:
the time zone, or
null
if not found- Type
- baja.TimeZone
-
getTimeZones()
-
Return all
TimeZone
instances 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 id
string Returns:
- Type
- boolean