Expand description
Intl (ECMAScript Internationalization API Specification) 実装。
Intl.NumberFormat, Intl.DateTimeFormat, Intl.Collator, Intl.PluralRules,
Intl.RelativeTimeFormat, Intl.Segmenter, Intl.ListFormat, Intl.DisplayNames,
および Intl.getCanonicalLocales を提供する。
Functions§
- build_
nf_ 🔒options new Intl.NumberFormat(locales, options)とNumber.prototype.toLocaleString(locales, options)の設定の解決。- canonicalize_
locale_ 🔒list - create_
intl_ 🔒constructor - create_
intl_ 🔒object Intlグローバルオブジェクトを作成して返す。- ctor_
locale 🔒 - get_
options_ 🔒object - GetOptionsObject(
strict)/ CoerceOptionsToObject。nullは TypeError、strictでは原始値も TypeError。 - intl_
collator_ 🔒compare - intl_
collator_ 🔒ctor - intl_
collator_ 🔒resolved_ options - intl_
collator_ 🔒supported_ locales_ of - intl_
ctor_ 🔒common Intl.*コンストラクタの共通の前処理(newの確認・ロケール・options)。- intl_
datetime_ 🔒format_ ctor - intl_
datetime_ 🔒format_ format - intl_
datetime_ 🔒format_ format_ to_ parts - intl_
datetime_ 🔒format_ resolved_ options - intl_
display_ 🔒names_ ctor - intl_
display_ 🔒names_ of - intl_
display_ 🔒names_ resolved_ options - intl_
duration_ 🔒format_ ctor - intl_
duration_ 🔒format_ format - intl_
duration_ 🔒format_ format_ to_ parts - intl_
duration_ 🔒format_ resolved_ options - intl_
get_ 🔒canonical_ locales - intl_
list_ 🔒format_ ctor - intl_
list_ 🔒format_ format - intl_
list_ 🔒format_ format_ to_ parts - intl_
list_ 🔒format_ resolved_ options - intl_
number_ 🔒format_ ctor - intl_
number_ 🔒format_ format - intl_
number_ 🔒format_ format_ to_ parts - intl_
number_ 🔒format_ resolved_ options - intl_
plural_ 🔒rules_ ctor - intl_
plural_ 🔒rules_ resolved_ options - intl_
plural_ 🔒rules_ select - intl_
relative_ 🔒time_ format_ ctor - intl_
relative_ 🔒time_ format_ format - intl_
relative_ 🔒time_ format_ format_ to_ parts - intl_
relative_ 🔒time_ format_ resolved_ options - intl_
segmenter_ 🔒ctor - intl_
segmenter_ 🔒resolved_ options - intl_
segmenter_ 🔒segment - intl_
supported_ 🔒locales_ of - intl_
supported_ 🔒values_ of - nf_
from_ 🔒obj - nf_
locale 🔒 - ロケールの引数(文字列・配列風オブジェクト・Locale・未指定)から先頭のタグを取る(正規化済み)。
- nf_of 🔒
- nf_
to_ 🔒obj - nf_
value 🔒 - 値を数にする(BigInt・文字列も。
Intl.NumberFormat.prototype.format(x)の ToNumeric)。 - opt_
bool 🔒 - opt_num 🔒
- 整数のオプション(
min..=max)。範囲外は RangeError。 - opt_
obj_ 🔒get - opt_str 🔒
- 文字列のオプション。許された値以外は RangeError。
- proto_
chain_ 🔒includes newを介さない裸呼び出し(Intl.NumberFormat()。Intl系コンストラクタは 仕様上どちらの呼び出し形式でも動作可能でなければならない)を正しく扱う。 メンバ呼出(Intl.NumberFormat(...))のthisは「メンバ式のレシーバ」 (interp/calls.rsのeval_callのコメントどおり)、つまりIntl名前空間オブジェクト自身になる。以前は「thisがオブジェクトなら そのまま使う」という判定だったため、newを省略するとIntlオブジェクト 自身に_intl_type/_localeを書き込んでしまい(Intl名前空間の汚染)、 かつIntlのproto連鎖には.format等が無いため常にundefinedになる バグだった。正しくはthisのprotoが既に対象コンストラクタのprototypeと一致する場合(new経由。construct_objectが設定済み) のみそのオブジェクトを再利用し、それ以外(裸呼び出し)はIntl.<name>. prototypeへ明示的に繋いだ新規オブジェクトを都度生成する。 2026-07-18 発見・実装。- require_
brand 🔒 - 内部スロット
_intl_typeによる型の確認(ブランドチェック)。 - resolve_
intl_ 🔒this new/Reflect.construct/super()/ 裸呼び出し(Intl.NumberFormat())を統一的に扱う。- resolve_
numbering 🔒 - 数字の体系(
numberingSystemオプションとタグの-u-nu-)を解決して(ロケール, 体系)を返す。 - set_
slot 🔒 - slot 🔒
- strip_
extensions 🔒 - 拡張(
-u-・-x-など)を除いたタグ。 - sv 🔒
- u_
ext_ 🔒nu - タグの Unicode 拡張(
-u-)にあるnuキーの値。