JavaScript

Intl.Locale.prototype.calendar プロパティ


編集:2023.01.10 by T.A.

[Edge]。→

Intl.Locale の暦の種類を文字列で返します。

構文
Intl.Locale.calendar
Intl.Locale Intl.Locale

文字列。→Intl.DateTimeFormat():calendar

DA=new Intl.Locale('ja-JP');  //日本語の日本国。
D=DA.calendar;  //=[undefined]:undefined
DA=new Intl.Locale('ja-JP-u-ca-japanese');  //日本語の日本国で歴指定。
D=DA.calendar;  //=[string]:japanese
DA=new Intl.Locale('ja-JP', {calendar:'japanese'});  //日本語の日本国で歴指定。
D=DA.calendar;  //=[string]:japanese

Intl.Locale()


テスト