Home Reference Source
public class | source

MomentZoneRulesProvider

Extends:

@js-joda/core~ZoneRulesProvider → MomentZoneRulesProvider

Static Method Summary

Static Public Methods
public static

getAvailableZoneIds(): string[]

Gets the set of available zone IDs.

public static

getRules(zoneId: string): ZoneRules

Gets the rules for the zone ID.

public static

getTzdbData(): object

Provides the packed tzdb data, the data has the same format as provided from moment-timezone.

public static

getVersion(): string

public static

loadTzdbData(packedJson: *)

Sets the packed tzdb data.

Static Public Methods

public static getAvailableZoneIds(): string[] source

Gets the set of available zone IDs.

These zone IDs are loaded and available for use by {@code ZoneId}.

Return:

string[]

a modifiable copy of the set of zone IDs, not null

public static getRules(zoneId: string): ZoneRules source

Gets the rules for the zone ID.

This returns the latest available rules for the zone ID.

This method relies on time-zone data provider files that are configured.

Params:

NameTypeAttributeDescription
zoneId string

Return:

ZoneRules

public static getTzdbData(): object source

Provides the packed tzdb data, the data has the same format as provided from moment-timezone.

Return:

object

the packed tzdb data.

public static getVersion(): string source

Return:

string

the tzdb version.

public static loadTzdbData(packedJson: *) source

Sets the packed tzdb data. Accepts tzdb data in the same format as provided from moment-timezone.

Params:

NameTypeAttributeDescription
packedJson *