Intl.Locale.prototype.timeZones

The Intl.Locale.prototype.timeZones property is an accessor property which returns an array of supported time zones for a chosen Locale.

Description

Returns an array with supported time zones for the associated Locale, returned time zones represents an IANA time zone.

Note: If the Unicode Language Identifier does not contain the - for the Unicode region subtag sequence, the returned value is undefined

Examples

Obtaining supported time zones

List supported time zones for a given Locale.

let arEG = new Intl.Locale("ar-EG");
console.log(arEG.timeZones); // logs ["Africa/Cairo"]
let jaJP = new Intl.Locale("ja-JP");
console.log(jaJP.hourCycles); // logs ["Asia/Tokyo"]
let ar = new Intl.Locale("ar");
console.log(ar.hourCycles); // logs undefined

Specifications

Specification
Intl Locale Info Proposal
# sec-Intl.Locale.prototype.timeZones

Browser compatibility

BCD tables only load in the browser

See also