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 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

No specification found

No specification data found for javascript.builtins.Intl.Locale.timeZones.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

No compatibility data found for javascript.builtins.Intl.Locale.timeZones.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/timeZones