Intl.Locale.prototype.weekInfo

Limited availability

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

Intl.Locale.prototype.weekInfo プロパティはアクセサープロパティで、関連する LocalefirstDay, weekend, minimalDays プロパティを持つ weekInfo オブジェクトを返します。

解説

UTS 35's Week Elements で指定されたロケールデータに関連する Locale 情報を返します。

週情報の取得

指定された Locale の週情報を返します。

js
let he = new Intl.Locale("he");
console.log(he.weekInfo); // logs {firstDay: 7, weekend: [5, 6], minimalDays: 1}

let af = new Intl.Locale("af");
console.log(af.weekInfo); // logs {firstDay: 7, weekend: [6, 7], minimalDays: 1}

let enGB = new Intl.Locale("en-GB");
console.log(enGB.weekInfo); // logs {firstDay: 1, weekend: [6, 7], minimalDays: 4}

let msBN = new Intl.Locale("ms-BN");
console.log(msBN.weekInfo); // logs {firstDay: 7, weekend: [5, 7], minimalDays: 1}  // ブルネイでは週末は金曜日と日曜日ですが、土曜日ではありません

仕様書

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

ブラウザーの互換性

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
getWeekInfo

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.

関連情報