Intl.Locale.prototype.timeZones
La propriété Intl.Locale.prototype.timeZones
est un accesseur qui renvoie un tableau des fuseaux horaires pris en charge pour la locale représentée par l'instance Intl.Locale
courante.
Description
Renvoie un tableau avec les fuseaux horaires pris en charge et associés à l'objet Locale
courant. Les éléments du tableau sont représentés au format IANA.
Note : Si l'identifiant de langue Unicode ne contient pas le tiret indiquant la sous-balise de région, la valeur de retour sera undefined
.
Exemples
Obtenir les fuseaux horaires pris en charge et associés à une locale
let arEG = new Intl.Locale("ar-EG");
console.log(arEG.timeZones); // affiche ["Africa/Cairo"]
let jaJP = new Intl.Locale("ja-JP");
console.log(jaJP.timeZones); // affiche ["Asia/Tokyo"]
let ar = new Intl.Locale("ar");
console.log(ar.timeZones); // affiche undefined
Spécifications
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.
Compatibilité des navigateurs
BCD tables only load in the browser