diff --git a/spec/datetimeformat.html b/spec/datetimeformat.html index 2519a1cc..0af22d15 100644 --- a/spec/datetimeformat.html +++ b/spec/datetimeformat.html @@ -73,12 +73,22 @@

InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ )

The abstract operation InitializeDateTimeFormat accepts the arguments _dateTimeFormat_ (which must be an object), _locales_, and _options_. It initializes _dateTimeFormat_ as a DateTimeFormat object. This abstract operation functions as follows:

+

+ The following algorithm refers to UTS 35's Unicode Locale Identifier grammar. +

+ 1. Let _requestedLocales_ be ? CanonicalizeLocaleList(_locales_). 1. Let _options_ be ? ToDateTimeOptions(_options_, `"any"`, `"date"`). 1. Let _opt_ be a new Record. 1. Let _matcher_ be ? GetOption(_options_, `"localeMatcher"`, `"string"`, « `"lookup"`, `"best fit"` », `"best fit"`). 1. Set _opt_.[[localeMatcher]] to _matcher_. + 1. Let _calendar_ be ? GetOption(_options_, `"calendar"`, `"string"`, *undefined*, *undefined*). + 1. If _calendar_ does not match `type`, throw a *RangeError* exception. + 1. Set _opt_.[[ca]] to _calendar_. + 1. Let _numberingSystem_ be ? GetOption(_options_, `"numberingSystem"`, `"string"`, *undefined*, *undefined*). + 1. If _numberingSystem_ does not match `type`, throw a *RangeError* exception. + 1. Set _opt_.[[nu]] to _numberingSystem_. 1. Let _hour12_ be ? GetOption(_options_, `"hour12"`, `"boolean"`, *undefined*, *undefined*). 1. Let _hourCycle_ be ? GetOption(_options_, `"hourCycle"`, `"string"`, « `"h11"`, `"h12"`, `"h23"`, `"h24"` », *undefined*). 1. If _hour12_ is not *undefined*, then diff --git a/spec/numberformat.html b/spec/numberformat.html index 979c8f53..fa170b0a 100644 --- a/spec/numberformat.html +++ b/spec/numberformat.html @@ -49,6 +49,9 @@

InitializeNumberFormat ( _numberFormat_, _locales_, _options_ )

1. Let _opt_ be a new Record. 1. Let _matcher_ be ? GetOption(_options_, `"localeMatcher"`, `"string"`, « `"lookup"`, `"best fit"` », `"best fit"`). 1. Set _opt_.[[localeMatcher]] to _matcher_. + 1. Let _numberingSystem_ be ? Get(_options_, *"numberingSystem"*). + 1. If _numberingSystem_ is not *undefined*, set _numberingSystem_ to ? ToString(_numberingSystem_). + 1. Set _opt_.[[nu]] to _numberingSystem_. 1. Let _localeData_ be %NumberFormat%.[[LocaleData]]. 1. Let _r_ be ResolveLocale(%NumberFormat%.[[AvailableLocales]], _requestedLocales_, _opt_, %NumberFormat%.[[RelevantExtensionKeys]], _localeData_). 1. Set _numberFormat_.[[Locale]] to _r_.[[locale]].