JavaScript

Intl.Locale オブジェクト


編集:2023.01.10 by T.A.

[Edge]。→

Unicode ロケール識別子を表すオブジェクト。

コンストラクター
new Intl.Locale(tag[, options])
新しい Intl.Locale オブジェクトを生成して返します。
インスタンス プロパティ
Intl.Locale.baseName
Intl.Locale の言語の基本情報を文字列で返します。
Intl.Locale.calendar
Intl.Locale の暦の種類を文字列で返します。
Intl.Locale.calendars
Intl.Locale に対応している歴を配列で返します。
Intl.Locale.caseFirst
Intl.Locale の比較規則で大文字小文字のどちらが先かを示す文字列を返します。
Intl.Locale.collation
Intl.Locale の比較の種別を表す文字列を返します。
Intl.Locale.hourCycle
Intl.Locale の時刻書式名を文字列で返します。
Intl.Locale.hourCycles
Intl.Locale の時刻書式名を表す文字列を配列で返します。
Intl.Locale.language
Intl.Locale の言語(¶言語コード)を文字列で返します。
Intl.Locale.numberingSystem
Intl.Locale の数字の表記法を文字列で返します。
Intl.Locale.numberingSystems
Intl.Locale の数字の表示方法を表す文字列を配列で返します。
Intl.Locale.numeric
Intl.Locale で数字を数値として扱うかどうかを論理値で返します。
Intl.Locale.region
Intl.Locale の国コードを表す文字列で返します。
Intl.Locale.script
Intl.Locale の文字体系を表す文字列を返します。
Intl.Locale.textInfo
Intl.Locale での書字方向を表す文字列をオブジェクトで返します。
Intl.Locale.timeZones
Intl.Locale での地域を表す文字列を配列で返します。
Intl.Locale.weekInfo
Intl.Locale での「週」情報をオブジェクトで返します。
インスタンス メソッド
Intl.Locale.maximize()
Intl.Locale から拡大した情報(言語と文字体系と地域)をオブジェクト?で返します。
Intl.Locale.minimize()
Intl.Locale から最小限の情報(言語コード、文字体系、地域を含む)をオブジェクト?で返します。
Intl.Locale.toString()
Intl.Locale での計算されたロケール識別子を文字列で返します。
DA=new Intl.Locale("ja-JP", {hourCycle:"h12"});  //日本語の日本国。12時間制の…。
D=DA.hourCycle;  //=[string]:h12

DA=new Intl.Locale("ja-JP", {hourCycle:"h12"});  //日本語の日本国。12時間制の…。
D=DA.toString();  //=[string]:ja-JP-u-hc-h12

テスト