Intl.Locale.prototype.timeZones

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Intl.Locale.prototype.timeZones プロパティはアクセサープロパティで、選択した Locale で対応しているタイムゾーンの配列を返します。

解説

関連付けられた Locale で対応しているタイムゾーンを配列で返します。返されるタイムゾーンは IANA タイムゾーン を表します。

メモ: Unicode 言語識別子が Unicode 地域サブタグシーケンスの - を含んでいない場合、返される値は undefined です。

対応しているタイムゾーンの取得

指定された Locale で対応しているタイムゾーンをリストアップします。

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

仕様書

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

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
getTimeZones

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.
Uses a non-standard name.
Has more compatibility info.

関連情報