JavaScript

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


編集:2023.01.10 by T.A.

[Edge]。→

Intl.Locale の、数字を数値として扱うかどうかの状態を論理値で返します。

構文
Intl.Locale.numeric
Intl.Locale Intl.Locale

論理値。→Intl.Collator():numeric

DA=new Intl.Locale('ja-JP');  //日本語の日本国。
D=DA.numeric;  //=[boolean]:false
DA=new Intl.Locale('ja-JP-u-kn-true');  //日本語の日本国で数字は数値。
D=DA.numeric;  //=[boolean]:true
DA=new Intl.Locale('ja-JP', {numeric:'true'});  //日本語の日本国、数字は数値。
D=DA.numeric;  //=[boolean]:true

//●書き込めるか?
DA=new Intl.Locale('ja-JP');  //日本語の日本国。
DA.numeric=true;
D=DA.numeric;  //=[boolean]:false。書き込めないようだが。

Intl.Locale()言語タグ


テスト