From 60e19a908a02a7483954592b6ff39cfd8a6b8b86 Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Wed, 18 Dec 2019 21:41:31 -0800 Subject: [PATCH 1/2] add link to ECMA-262 algorithm conventions --- spec/conventions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/conventions.html b/spec/conventions.html index b2045203..13614eeb 100644 --- a/spec/conventions.html +++ b/spec/conventions.html @@ -7,7 +7,7 @@

Notational Conventions

From 1f7ab30c20f4c7820e1760d53d3cd298c1d76fc9 Mon Sep 17 00:00:00 2001 From: Valerie Young Date: Wed, 18 Dec 2019 22:15:37 -0800 Subject: [PATCH 2/2] Update string literal notation to match ECMA-262 --- spec/annexes.html | 14 +- spec/collator.html | 64 ++++----- spec/conventions.html | 2 +- spec/datetimeformat.html | 204 +++++++++++++-------------- spec/intl.html | 2 +- spec/locale-sensitive-functions.html | 20 +-- spec/locales-currencies-tz.html | 12 +- spec/negotiation.html | 62 ++++---- spec/numberformat.html | 154 ++++++++++---------- spec/pluralrules.html | 36 ++--- 10 files changed, 285 insertions(+), 285 deletions(-) diff --git a/spec/annexes.html b/spec/annexes.html index 25f6b91e..ddfb2c79 100644 --- a/spec/annexes.html +++ b/spec/annexes.html @@ -39,13 +39,13 @@

Implementation Dependent Behaviour

Support for the Unicode extensions keys kn, kf and the parallel options properties numeric, caseFirst ()
  • - The set of supported `"co"` key values (collations) per locale beyond a default collation () + The set of supported *"co"* key values (collations) per locale beyond a default collation ()
  • - The set of supported `"kn"` key values (numeric collation) per locale () + The set of supported *"kn"* key values (numeric collation) per locale ()
  • - The set of supported `"kf"` key values (case order) per locale () + The set of supported *"kf"* key values (case order) per locale ()
  • The default search sensitivity per locale () @@ -59,7 +59,7 @@

    Implementation Dependent Behaviour

    In NumberFormat:
    • - The set of supported `"nu"` key values (numbering systems) per locale () + The set of supported *"nu"* key values (numbering systems) per locale ()
    • The patterns used for formatting positive and negative values as decimal, percent, or currency values per locale () @@ -87,10 +87,10 @@

      Implementation Dependent Behaviour

      The BestFitFormatMatcher algorithm ()
    • - The set of supported `"ca"` key values (calendars) per locale () + The set of supported *"ca"* key values (calendars) per locale ()
    • - The set of supported `"nu"` key values (numbering systems) per locale () + The set of supported *"nu"* key values (numbering systems) per locale ()
    • The default hourCycle setting per locale () @@ -102,7 +102,7 @@

      Implementation Dependent Behaviour

      Localized weekday names, era names, month names, am/pm indicators, and time zone names ()
    • - The calendric calculations used for calendars other than `"gregory"`, and adjustments for local time zones and daylight saving time () + The calendric calculations used for calendars other than *"gregory"*, and adjustments for local time zones and daylight saving time ()
  • diff --git a/spec/collator.html b/spec/collator.html index 9f236cb3..d3363db3 100644 --- a/spec/collator.html +++ b/spec/collator.html @@ -20,41 +20,41 @@

    InitializeCollator ( _collator_, _locales_, _options_ )

    1. Let _options_ be ObjectCreate(*null*). 1. Else, 1. Let _options_ be ? ToObject(_options_). - 1. Let _usage_ be ? GetOption(_options_, `"usage"`, `"string"`, « `"sort"`, `"search"` », `"sort"`). + 1. Let _usage_ be ? GetOption(_options_, *"usage"*, *"string"*, « *"sort"*, *"search"* », *"sort"*). 1. Set _collator_.[[Usage]] to _usage_. - 1. If _usage_ is `"sort"`, then + 1. If _usage_ is *"sort"*, then 1. Let _localeData_ be %Collator%.[[SortLocaleData]]. 1. Else, 1. Let _localeData_ be %Collator%.[[SearchLocaleData]]. 1. Let _opt_ be a new Record. - 1. Let _matcher_ be ? GetOption(_options_, `"localeMatcher"`, `"string"`, « `"lookup"`, `"best fit"` », `"best fit"`). + 1. Let _matcher_ be ? GetOption(_options_, *"localeMatcher"*, *"string"*, « *"lookup"*, *"best fit"* », *"best fit"*). 1. Set _opt_.[[localeMatcher]] to _matcher_. - 1. Let _numeric_ be ? GetOption(_options_, `"numeric"`, `"boolean"`, *undefined*, *undefined*). + 1. Let _numeric_ be ? GetOption(_options_, *"numeric"*, *"boolean"*, *undefined*, *undefined*). 1. If _numeric_ is not *undefined*, then 1. Let _numeric_ be ! ToString(_numeric_). 1. Set _opt_.[[kn]] to _numeric_. - 1. Let _caseFirst_ be ? GetOption(_options_, `"caseFirst"`, `"string"`, « `"upper"`, `"lower"`, `"false"` », *undefined*). + 1. Let _caseFirst_ be ? GetOption(_options_, *"caseFirst"*, *"string"*, « *"upper"*, *"lower"*, *"false"* », *undefined*). 1. Set _opt_.[[kf]] to _caseFirst_. 1. Let _relevantExtensionKeys_ be %Collator%.[[RelevantExtensionKeys]]. 1. Let _r_ be ResolveLocale(%Collator%.[[AvailableLocales]], _requestedLocales_, _opt_, _relevantExtensionKeys_, _localeData_). 1. Set _collator_.[[Locale]] to _r_.[[locale]]. 1. Let _collation_ be _r_.[[co]]. - 1. If _collation_ is *null*, let _collation_ be `"default"`. + 1. If _collation_ is *null*, let _collation_ be *"default"*. 1. Set _collator_.[[Collation]] to _collation_. - 1. If _relevantExtensionKeys_ contains `"kn"`, then - 1. Set _collator_.[[Numeric]] to ! SameValue(_r_.[[kn]], `"true"`). - 1. If _relevantExtensionKeys_ contains `"kf"`, then + 1. If _relevantExtensionKeys_ contains *"kn"*, then + 1. Set _collator_.[[Numeric]] to ! SameValue(_r_.[[kn]], *"true"*). + 1. If _relevantExtensionKeys_ contains *"kf"*, then 1. Set _collator_.[[CaseFirst]] to _r_.[[kf]]. - 1. Let _sensitivity_ be ? GetOption(_options_, `"sensitivity"`, `"string"`, « `"base"`, `"accent"`, `"case"`, `"variant"` », *undefined*). + 1. Let _sensitivity_ be ? GetOption(_options_, *"sensitivity"*, *"string"*, « *"base"*, *"accent"*, *"case"*, *"variant"* », *undefined*). 1. If _sensitivity_ is *undefined*, then - 1. If _usage_ is `"sort"`, then - 1. Let _sensitivity_ be `"variant"`. + 1. If _usage_ is *"sort"*, then + 1. Let _sensitivity_ be *"variant"*. 1. Else, 1. Let _dataLocale_ be _r_.[[dataLocale]]. 1. Let _dataLocaleData_ be _localeData_.[[<_dataLocale_>]]. 1. Let _sensitivity_ be _dataLocaleData_.[[sensitivity]]. 1. Set _collator_.[[Sensitivity]] to _sensitivity_. - 1. Let _ignorePunctuation_ be ? GetOption(_options_, `"ignorePunctuation"`, `"boolean"`, *undefined*, *false*). + 1. Let _ignorePunctuation_ be ? GetOption(_options_, *"ignorePunctuation"*, *"boolean"*, *undefined*, *false*). 1. Set _collator_.[[IgnorePunctuation]] to _ignorePunctuation_. 1. Return _collator_. @@ -71,11 +71,11 @@

    Intl.Collator ( [ _locales_ [ , _options_ ] ] )

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object, else let _newTarget_ be NewTarget. 1. Let _internalSlotsList_ be « [[InitializedCollator]], [[Locale]], [[Usage]], [[Sensitivity]], [[IgnorePunctuation]], [[Collation]], [[BoundCompare]] ». - 1. If %Collator%.[[RelevantExtensionKeys]] contains `"kn"`, then + 1. If %Collator%.[[RelevantExtensionKeys]] contains *"kn"*, then 1. Append [[Numeric]] as the last element of _internalSlotsList_. - 1. If %Collator%.[[RelevantExtensionKeys]] contains `"kf"`, then + 1. If %Collator%.[[RelevantExtensionKeys]] contains *"kf"*, then 1. Append [[CaseFirst]] as the last element of _internalSlotsList_. - 1. Let _collator_ be ? OrdinaryCreateFromConstructor(_newTarget_, `"%CollatorPrototype%"`, _internalSlotsList_). + 1. Let _collator_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%CollatorPrototype%"*, _internalSlotsList_). 1. Return ? InitializeCollator(_collator_, _locales_, _options_). @@ -122,11 +122,11 @@

    Intl.Collator.supportedLocalesOf ( _locales_ [ , _options_ ] )

    Internal Slots

    - The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in . The value of the [[RelevantExtensionKeys]] internal slot is a List that must include the element `"co"`, may include any or all of the elements `"kn"` and `"kf"`, and must not include any other elements. + The value of the [[AvailableLocales]] internal slot is implementation defined within the constraints described in . The value of the [[RelevantExtensionKeys]] internal slot is a List that must include the element *"co"*, may include any or all of the elements *"kn"* and *"kf"*, and must not include any other elements.

    - Unicode Technical Standard 35 describes ten locale extension keys that are relevant to collation: `"co"` for collator usage and specializations, `"ka"` for alternate handling, `"kb"` for backward second level weight, `"kc"` for case level, `"kn"` for numeric, `"kh"` for hiragana quaternary, `"kk"` for normalization, `"kf"` for case first, `"kr"` for reordering, `"ks"` for collation strength, and `"vt"` for variable top. Collator, however, requires that the usage is specified through the usage property of the options object, alternate handling through the ignorePunctuation property of the options object, and case level and the strength through the sensitivity property of the options object. The `"co"` key in the language tag is supported only for collator specializations, and the keys `"kb"`, `"kh"`, `"kk"`, `"kr"`, and `"vt"` are not allowed in this version of the Internationalization API. Support for the remaining keys is implementation dependent. + Unicode Technical Standard 35 describes ten locale extension keys that are relevant to collation: *"co"* for collator usage and specializations, *"ka"* for alternate handling, *"kb"* for backward second level weight, *"kc"* for case level, *"kn"* for numeric, *"kh"* for hiragana quaternary, *"kk"* for normalization, *"kf"* for case first, *"kr"* for reordering, *"ks"* for collation strength, and *"vt"* for variable top. Collator, however, requires that the usage is specified through the usage property of the options object, alternate handling through the ignorePunctuation property of the options object, and case level and the strength through the sensitivity property of the options object. The *"co"* key in the language tag is supported only for collator specializations, and the keys *"kb"*, *"kh"*, *"kk"*, *"kr"*, and *"vt"* are not allowed in this version of the Internationalization API. Support for the remaining keys is implementation dependent.

    @@ -135,8 +135,8 @@

    Internal Slots

    @@ -161,7 +161,7 @@

    Intl.Collator.prototype.constructor

    Intl.Collator.prototype [ @@toStringTag ]

    - The initial value of the @@toStringTag property is the String value `"Object"`. + The initial value of the @@toStringTag property is the String value *"Object"*.

    @@ -296,37 +296,37 @@

    Intl.Collator.prototype.resolvedOptions ()

    [[Locale]] - `"locale"` + *"locale"* [[Usage]] - `"usage"` + *"usage"* [[Sensitivity]] - `"sensitivity"` + *"sensitivity"* [[IgnorePunctuation]] - `"ignorePunctuation"` + *"ignorePunctuation"* [[Collation]] - `"collation"` + *"collation"* [[Numeric]] - `"numeric"` + *"numeric"* kn [[CaseFirst]] - `"caseFirst"` + *"caseFirst"* kf @@ -351,10 +351,10 @@

    Properties of Intl.Collator Instances

    @@ -363,7 +363,7 @@

    Properties of Intl.Collator Instances

    diff --git a/spec/conventions.html b/spec/conventions.html index 13614eeb..2499722e 100644 --- a/spec/conventions.html +++ b/spec/conventions.html @@ -17,7 +17,7 @@

    Notational Conventions

    - As an extension to the Record Specification Type, the notation “[[<_name_>]]” denotes a field whose name is given by the variable _name_, which must have a String value. For example, if a variable _s_ has the value `"a"`, then [[<_s_>]] denotes the field [[a]]. + As an extension to the Record Specification Type, the notation “[[<_name_>]]” denotes a field whose name is given by the variable _name_, which must have a String value. For example, if a variable _s_ has the value *"a"*, then [[<_s_>]] denotes the field [[a]].

    diff --git a/spec/datetimeformat.html b/spec/datetimeformat.html index 4305d49c..1477e976 100644 --- a/spec/datetimeformat.html +++ b/spec/datetimeformat.html @@ -20,48 +20,48 @@

    Abstract Operations For DateTimeFormat Objects

    [[Weekday]] - `"weekday"` - `"narrow"`, `"short"`, `"long"` + *"weekday"* + *"narrow"*, *"short"*, *"long"* [[Era]] - `"era"` - `"narrow"`, `"short"`, `"long"` + *"era"* + *"narrow"*, *"short"*, *"long"* [[Year]] - `"year"` - `"2-digit"`, `"numeric"` + *"year"* + *"2-digit"*, *"numeric"* [[Month]] - `"month"` - `"2-digit"`, `"numeric"`, `"narrow"`, `"short"`, `"long"` + *"month"* + *"2-digit"*, *"numeric"*, *"narrow"*, *"short"*, *"long"* [[Day]] - `"day"` - `"2-digit"`, `"numeric"` + *"day"* + *"2-digit"*, *"numeric"* [[Hour]] - `"hour"` - `"2-digit"`, `"numeric"` + *"hour"* + *"2-digit"*, *"numeric"* [[Minute]] - `"minute"` - `"2-digit"`, `"numeric"` + *"minute"* + *"2-digit"*, *"numeric"* [[Second]] - `"second"` - `"2-digit"`, `"numeric"` + *"second"* + *"2-digit"*, *"numeric"* [[TimeZoneName]] - `"timeZoneName"` - `"short"`, `"long"` + *"timeZoneName"* + *"short"*, *"long"* @@ -75,12 +75,12 @@

    InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ )

    1. Let _requestedLocales_ be ? CanonicalizeLocaleList(_locales_). - 1. Let _options_ be ? ToDateTimeOptions(_options_, `"any"`, `"date"`). + 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. Let _matcher_ be ? GetOption(_options_, *"localeMatcher"*, *"string"*, « *"lookup"*, *"best fit"* », *"best fit"*). 1. Set _opt_.[[localeMatcher]] to _matcher_. - 1. Let _hour12_ be ? GetOption(_options_, `"hour12"`, `"boolean"`, *undefined*, *undefined*). - 1. Let _hourCycle_ be ? GetOption(_options_, `"hourCycle"`, `"string"`, « `"h11"`, `"h12"`, `"h23"`, `"h24"` », *undefined*). + 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 1. Let _hourCycle_ be *null*. 1. Set _opt_.[[hc]] to _hourCycle_. @@ -91,7 +91,7 @@

    InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ )

    1. Set _dateTimeFormat_.[[HourCycle]] to _r_.[[hc]]. 1. Set _dateTimeFormat_.[[NumberingSystem]] to _r_.[[nu]]. 1. Let _dataLocale_ be _r_.[[dataLocale]]. - 1. Let _timeZone_ be ? Get(_options_, `"timeZone"`). + 1. Let _timeZone_ be ? Get(_options_, *"timeZone"*). 1. If _timeZone_ is not *undefined*, then 1. Let _timeZone_ be ? ToString(_timeZone_). 1. If the result of IsValidTimeZoneName(_timeZone_) is *false*, then @@ -103,12 +103,12 @@

    InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ )

    1. Let _opt_ be a new Record. 1. For each row of , except the header row, in table order, do 1. Let _prop_ be the name given in the Property column of the row. - 1. Let _value_ be ? GetOption(_options_, _prop_, `"string"`, « the strings given in the Values column of the row », *undefined*). + 1. Let _value_ be ? GetOption(_options_, _prop_, *"string"*, « the strings given in the Values column of the row », *undefined*). 1. Set _opt_.[[<_prop_>]] to _value_. 1. Let _dataLocaleData_ be _localeData_.[[<_dataLocale_>]]. 1. Let _formats_ be _dataLocaleData_.[[formats]]. - 1. Let _matcher_ be ? GetOption(_options_, `"formatMatcher"`, `"string"`, « `"basic"`, `"best fit"` », `"best fit"`). - 1. If _matcher_ is `"basic"`, then + 1. Let _matcher_ be ? GetOption(_options_, *"formatMatcher"*, *"string"*, « *"basic"*, *"best fit"* », *"best fit"*). + 1. If _matcher_ is *"basic"*, then 1. Let _bestFormat_ be BasicFormatMatcher(_opt_, _formats_). 1. Else, 1. Let _bestFormat_ be BestFitFormatMatcher(_opt_, _formats_). @@ -124,18 +124,18 @@

    InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ )

    1. Set _hc_ to _hcDefault_. 1. If _hour12_ is not *undefined*, then 1. If _hour12_ is *true*, then - 1. If _hcDefault_ is `"h11"` or `"h23"`, then - 1. Set _hc_ to `"h11"`. + 1. If _hcDefault_ is *"h11"* or *"h23"*, then + 1. Set _hc_ to *"h11"*. 1. Else, - 1. Set _hc_ to `"h12"`. + 1. Set _hc_ to *"h12"*. 1. Else, 1. Assert: _hour12_ is *false*. - 1. If _hcDefault_ is `"h11"` or `"h23"`, then - 1. Set _hc_ to `"h23"`. + 1. If _hcDefault_ is *"h11"* or *"h23"*, then + 1. Set _hc_ to *"h23"*. 1. Else, - 1. Set _hc_ to `"h24"`. + 1. Set _hc_ to *"h24"*. 1. Set _dateTimeFormat_.[[HourCycle]] to _hc_. - 1. If _dateTimeformat_.[[HourCycle]] is `"h11"` or `"h12"`, then + 1. If _dateTimeformat_.[[HourCycle]] is *"h11"* or *"h12"*, then 1. Let _pattern_ be _bestFormat_.[[pattern12]]. 1. Else, 1. Let _pattern_ be _bestFormat_.[[pattern]]. @@ -158,22 +158,22 @@

    ToDateTimeOptions ( _options_, _required_, _defaults_ )

    1. If _options_ is *undefined*, let _options_ be *null*; otherwise let _options_ be ? ToObject(_options_). 1. Let _options_ be ObjectCreate(_options_). 1. Let _needDefaults_ be *true*. - 1. If _required_ is `"date"` or `"any"`, then - 1. For each of the property names `"weekday"`, `"year"`, `"month"`, `"day"`, do + 1. If _required_ is *"date"* or *"any"*, then + 1. For each of the property names *"weekday"*, *"year"*, *"month"*, *"day"*, do 1. Let _prop_ be the property name. 1. Let _value_ be ? Get(_options_, _prop_). 1. If _value_ is not *undefined*, let _needDefaults_ be *false*. - 1. If _required_ is `"time"` or `"any"`, then - 1. For each of the property names `"hour"`, `"minute"`, `"second"`, do + 1. If _required_ is *"time"* or *"any"*, then + 1. For each of the property names *"hour"*, *"minute"*, *"second"*, do 1. Let _prop_ be the property name. 1. Let _value_ be ? Get(_options_, _prop_). 1. If _value_ is not *undefined*, let _needDefaults_ be *false*. - 1. If _needDefaults_ is *true* and _defaults_ is either `"date"` or `"all"`, then - 1. For each of the property names `"year"`, `"month"`, `"day"`, do - 1. Perform ? CreateDataPropertyOrThrow(_options_, _prop_, `"numeric"`). - 1. If _needDefaults_ is *true* and _defaults_ is either `"time"` or `"all"`, then - 1. For each of the property names `"hour"`, `"minute"`, `"second"`, do - 1. Perform ? CreateDataPropertyOrThrow(_options_, _prop_, `"numeric"`). + 1. If _needDefaults_ is *true* and _defaults_ is either *"date"* or *"all"*, then + 1. For each of the property names *"year"*, *"month"*, *"day"*, do + 1. Perform ? CreateDataPropertyOrThrow(_options_, _prop_, *"numeric"*). + 1. If _needDefaults_ is *true* and _defaults_ is either *"time"* or *"all"*, then + 1. For each of the property names *"hour"*, *"minute"*, *"second"*, do + 1. Perform ? CreateDataPropertyOrThrow(_options_, _prop_, *"numeric"*). 1. Return _options_.
    @@ -203,7 +203,7 @@

    BasicFormatMatcher ( _options_, _formats_ )

    1. If _optionsProp_ is *undefined* and _formatProp_ is not *undefined*, then decrease _score_ by _additionPenalty_. 1. Else if _optionsProp_ is not *undefined* and _formatProp_ is *undefined*, then decrease _score_ by _removalPenalty_. 1. Else if _optionsProp_ ≠ _formatProp_, - 1. Let _values_ be « `"2-digit"`, `"numeric"`, `"narrow"`, `"short"`, `"long"` ». + 1. Let _values_ be « *"2-digit"*, *"numeric"*, *"narrow"*, *"short"*, *"long"* ». 1. Let _optionsPropIndex_ be the index of _optionsProp_ within _values_. 1. Let _formatPropIndex_ be the index of _formatProp_ within _values_. 1. Let _delta_ be max(min(_formatPropIndex_ - _optionsPropIndex_, 2), -2). @@ -259,58 +259,58 @@

    PartitionDateTimePattern ( _dateTimeFormat_, _x_ )

    1. If _x_ is *NaN*, throw a *RangeError* exception. 1. Let _locale_ be _dateTimeFormat_.[[Locale]]. 1. Let _nfOptions_ be ObjectCreate(*null*). - 1. Perform ! CreateDataPropertyOrThrow(_nfOptions_, `"useGrouping"`, *false*). + 1. Perform ! CreateDataPropertyOrThrow(_nfOptions_, *"useGrouping"*, *false*). 1. Let _nf_ be ? Construct(%NumberFormat%, « _locale_, _nfOptions_ »). 1. Let _nf2Options_ be ObjectCreate(*null*). - 1. Perform ! CreateDataPropertyOrThrow(_nf2Options_, `"minimumIntegerDigits"`, 2). - 1. Perform ! CreateDataPropertyOrThrow(_nf2Options_, `"useGrouping"`, *false*). + 1. Perform ! CreateDataPropertyOrThrow(_nf2Options_, *"minimumIntegerDigits"*, 2). + 1. Perform ! CreateDataPropertyOrThrow(_nf2Options_, *"useGrouping"*, *false*). 1. Let _nf2_ be ? Construct(%NumberFormat%, « _locale_, _nf2Options_ »). 1. Let _tm_ be ToLocalTime(_x_, _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). 1. Let _result_ be a new empty List. 1. Let _patternParts_ be PartitionPattern(_dateTimeFormat_.[[Pattern]]). 1. For each element _patternPart_ of _patternParts_, in List order, do 1. Let _p_ be _patternPart_.[[Type]]. - 1. If _p_ is `"literal"`, then - 1. Add new part record { [[Type]]: `"literal"`, [[Value]]: _patternPart_.[[Value]] } as a new element of the list _result_. + 1. If _p_ is *"literal"*, then + 1. Add new part record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]] } as a new element of the list _result_. 1. If _p_ matches a Property column of the row in , then 1. Let _f_ be the value of _dateTimeFormat_'s internal slot whose name is the Internal Slot column of the matching row. 1. Let _v_ be the value of _tm_'s field whose name is the Internal Slot column of the matching row. - 1. If _p_ is `"year"` and _v_ ≤ 0, let _v_ be 1 - _v_. - 1. If _p_ is `"month"`, increase _v_ by 1. - 1. If _p_ is `"hour"` and _dateTimeFormat_.[[HourCycle]] is `"h11"` or `"h12"`, then + 1. If _p_ is *"year"* and _v_ ≤ 0, let _v_ be 1 - _v_. + 1. If _p_ is *"month"*, increase _v_ by 1. + 1. If _p_ is *"hour"* and _dateTimeFormat_.[[HourCycle]] is *"h11"* or *"h12"*, then 1. Let _v_ be _v_ modulo 12. - 1. If _v_ is 0 and _dateTimeFormat_.[[HourCycle]] is `"h12"`, let _v_ be 12. - 1. If _p_ is `"hour"` and _dateTimeFormat_.[[HourCycle]] is `"h24"`, then + 1. If _v_ is 0 and _dateTimeFormat_.[[HourCycle]] is *"h12"*, let _v_ be 12. + 1. If _p_ is *"hour"* and _dateTimeFormat_.[[HourCycle]] is *"h24"*, then 1. If _v_ is 0, let _v_ be 24. - 1. If _f_ is `"numeric"`, then + 1. If _f_ is *"numeric"*, then 1. Let _fv_ be FormatNumeric(_nf_, _v_). - 1. Else if _f_ is `"2-digit"`, then + 1. Else if _f_ is *"2-digit"*, then 1. Let _fv_ be FormatNumeric(_nf2_, _v_). 1. If the `length` property of _fv_ is greater than 2, let _fv_ be the substring of _fv_ containing the last two characters. - 1. Else if _f_ is `"narrow"`, `"short"`, or `"long"`, then let _fv_ be a String value representing _f_ in the desired form; the String value depends upon the implementation and the effective locale and calendar of _dateTimeFormat_. If _p_ is `"month"`, then the String value may also depend on whether _dateTimeFormat_ has a [[Day]] internal slot. If _p_ is `"timeZoneName"`, then the String value may also depend on the value of the [[inDST]] field of _tm_. If _p_ is `"era"`, then the String value may also depend on whether _dateTimeFormat_ has a [[Era]] internal slot and if the implementation does not have a localized representation of _f_, then use _f_ itself. + 1. Else if _f_ is *"narrow"*, *"short"*, or *"long"*, then let _fv_ be a String value representing _f_ in the desired form; the String value depends upon the implementation and the effective locale and calendar of _dateTimeFormat_. If _p_ is *"month"*, then the String value may also depend on whether _dateTimeFormat_ has a [[Day]] internal slot. If _p_ is *"timeZoneName"*, then the String value may also depend on the value of the [[inDST]] field of _tm_. If _p_ is *"era"*, then the String value may also depend on whether _dateTimeFormat_ has a [[Era]] internal slot and if the implementation does not have a localized representation of _f_, then use _f_ itself. 1. Add new part record { [[Type]]: _p_, [[Value]]: _fv_ } as a new element of the list _result_. - 1. Else if _p_ is equal to `"ampm"`, then + 1. Else if _p_ is equal to *"ampm"*, then 1. Let _v_ be _tm_.[[hour]]. 1. If _v_ is greater than 11, then - 1. Let _fv_ be an implementation and locale dependent String value representing `"post meridiem"`. + 1. Let _fv_ be an implementation and locale dependent String value representing *"post meridiem"*. 1. Else, - 1. Let _fv_ be an implementation and locale dependent String value representing `"ante meridiem"`. - 1. Add new part record { [[Type]]: `"dayPeriod"`, [[Value]]: _fv_ } as a new element of the list _result_. - 1. Else if _p_ is equal to `"relatedYear"`, then + 1. Let _fv_ be an implementation and locale dependent String value representing *"ante meridiem"*. + 1. Add new part record { [[Type]]: *"dayPeriod"*, [[Value]]: _fv_ } as a new element of the list _result_. + 1. Else if _p_ is equal to *"relatedYear"*, then 1. Let _v_ be _tm_.[[relatedYear]]. 1. Let _fv_ be FormatNumber(_nf_, _v_). - 1. Add new part record { [[Type]]: `"relatedYear"`, [[Value]]: _fv_ } as a new element of the list _result_. - 1. Else if _p_ is equal to `"yearName"`, then + 1. Add new part record { [[Type]]: *"relatedYear"*, [[Value]]: _fv_ } as a new element of the list _result_. + 1. Else if _p_ is equal to *"yearName"*, then 1. Let _v_ be _tm_.[[yearName]]. - 1. Add new part record { [[Type]]: `"yearName"`, [[Value]]: _v_ } as a new element of the list _result_. + 1. Add new part record { [[Type]]: *"yearName"*, [[Value]]: _v_ } as a new element of the list _result_. 1. Else, 1. Let _unknown_ be an implementation-, locale-, and numbering system-dependent String based on _x_ and _p_. - 1. Append a new Record { [[Type]]: `"unknown"`, [[Value]]: _unknown_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"unknown"*, [[Value]]: _unknown_ } as the last element of _result_. 1. Return _result_. - It is recommended that implementations use the locale and calendar dependent strings provided by the Common Locale Data Repository (available at http://cldr.unicode.org), and use CLDR `"abbreviated"` strings for DateTimeFormat `"short"` strings, and CLDR `"wide"` strings for DateTimeFormat `"long"` strings. + It is recommended that implementations use the locale and calendar dependent strings provided by the Common Locale Data Repository (available at http://cldr.unicode.org), and use CLDR *"abbreviated"* strings for DateTimeFormat *"short"* strings, and CLDR *"wide"* strings for DateTimeFormat *"long"* strings. @@ -349,8 +349,8 @@

    FormatDateTimeToParts ( _dateTimeFormat_, _x_ )

    1. Let _n_ be 0. 1. For each _part_ in _parts_, do 1. Let _O_ be ObjectCreate(%ObjectPrototype%). - 1. Perform ! CreateDataPropertyOrThrow(_O_, `"type"`, _part_.[[Type]]). - 1. Perform ! CreateDataPropertyOrThrow(_O_, `"value"`, _part_.[[Value]]). + 1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]). + 1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]). 1. Perform ! CreateDataProperty(_result_, ! ToString(_n_), _O_). 1. Increment _n_ by 1. 1. Return _result_. @@ -367,7 +367,7 @@

    ToLocalTime ( _t_, _calendar_, _timeZone_ )

    1. Assert: Type(_t_) is Number. - 1. If _calendar_ is `"gregory"`, + 1. If _calendar_ is *"gregory"*, 1. Let _timeZoneOffset_ be the value calculated according to LocalTZA(_t_, *true*) where the local time zone is replaced with timezone _timeZone_. 1. Let _tz_ be the time value _t_ + _timeZoneOffset_. 1. Return a record with fields calculated from _tz_ according to . @@ -477,7 +477,7 @@

    Intl.DateTimeFormat ( [ _locales_ [ , _options_ ] ] )

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object, else let _newTarget_ be NewTarget. - 1. Let _dateTimeFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, `"%DateTimeFormatPrototype%"`, « [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]], [[HourCycle]], [[Pattern]], [[BoundFormat]] »). + 1. Let _dateTimeFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%DateTimeFormatPrototype%"*, « [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]], [[HourCycle]], [[Pattern]], [[BoundFormat]] »). 1. Perform ? InitializeDateTimeFormat(_dateTimeFormat_, _locales_, _options_). @@ -539,11 +539,11 @@

    Internal slots

    - The value of the [[RelevantExtensionKeys]] internal slot is « `"ca"`, `"nu"`, `"hc"` ». + The value of the [[RelevantExtensionKeys]] internal slot is « *"ca"*, *"nu"*, *"hc"* ».

    - Unicode Technical Standard 35 describes three locale extension keys that are relevant to date and time formatting, `"ca"` for calendar, `"tz"` for time zone, `"hc"` for hour cycle, and implicitly `"nu"` for the numbering system of the number format used for numbers within the date format. DateTimeFormat, however, requires that the time zone is specified through the timeZone property in the options objects. + Unicode Technical Standard 35 describes three locale extension keys that are relevant to date and time formatting, *"ca"* for calendar, *"tz"* for time zone, *"hc"* for hour cycle, and implicitly *"nu"* for the numbering system of the number format used for numbers within the date format. DateTimeFormat, however, requires that the time zone is specified through the timeZone property in the options objects.

    @@ -552,13 +552,13 @@

    Internal slots

    • - [[LocaleData]].[[<_locale_>]].[[nu]] must be a List that does not include the values `"native"`, `"traditio"`, or `"finance"`. + [[LocaleData]].[[<_locale_>]].[[nu]] must be a List that does not include the values *"native"*, *"traditio"*, or *"finance"*.
    • - [[LocaleData]].[[<_locale_>]].[[hc]] must be « *null*, `"h11"`, `"h12"`, `"h23"`, `"h24"` ». + [[LocaleData]].[[<_locale_>]].[[hc]] must be « *null*, *"h11"*, *"h12"*, *"h23"*, *"h24"* ».
    • - [[LocaleData]].[[<_locale_>]].[[hourCycle]] must be a String value equal to `"h11"`, `"h12"`, `"h23"`, or `"h24"`. + [[LocaleData]].[[<_locale_>]].[[hourCycle]] must be a String value equal to *"h11"*, *"h12"*, *"h23"*, or *"h24"*.
    • [[LocaleData]].[[<_locale_>]].[[formats]] must be a List of records, each of which has a subset of the fields shown in , where each field must have one of the values specified for the field in . Multiple records in a List may use the same subset of the fields as long as they have different values for the fields. The following subsets must be available for each locale: @@ -571,12 +571,12 @@

      Internal slots

    • hour, minute, second
    • hour, minute
    - Each of the records must also have a [[pattern]] field, whose value is a String value that contains for each of the date and time format component fields of the record a substring starting with `"{"`, followed by the name of the field, followed by `"}"`. If the record has an hour field, it must also have a [[pattern12]] field, whose value is a String value that, in addition to the substrings of the [[pattern]] field, contains a substring `"{ampm}"`. If the record has a [[year]] field, the [[pattern]] and [[pattern12]] values may contain the substrings `"{yearName}"` and `"{relatedYear}"`. + Each of the records must also have a [[pattern]] field, whose value is a String value that contains for each of the date and time format component fields of the record a substring starting with *"{"*, followed by the name of the field, followed by *"}"*. If the record has an hour field, it must also have a [[pattern12]] field, whose value is a String value that, in addition to the substrings of the [[pattern]] field, contains a substring *"{ampm}"*. If the record has a [[year]] field, the [[pattern]] and [[pattern12]] values may contain the substrings *"{yearName}"* and *"{relatedYear}"*.

    - EXAMPLE An implementation might include the following record as part of its English locale data: {[[hour]]: `"numeric"`, [[minute]]: `"2-digit"`, [[second]]: `"2-digit"`, [[pattern]]: `"{hour}:{minute}:{second}"`, [[pattern12]]: `"{hour}:{minute}:{second} {ampm}"`}. + EXAMPLE An implementation might include the following record as part of its English locale data: {[[hour]]: *"numeric"*, [[minute]]: *"2-digit"*, [[second]]: *"2-digit"*, [[pattern]]: *"{hour}:{minute}:{second}"*, [[pattern12]]: *"{hour}:{minute}:{second} {ampm}"*}.

    @@ -604,7 +604,7 @@

    Intl.DateTimeFormat.prototype.constructor

    Intl.DateTimeFormat.prototype [ @@toStringTag ]

    - The initial value of the @@toStringTag property is the String value `"Object"`. + The initial value of the @@toStringTag property is the String value *"Object"*.

    @@ -668,10 +668,10 @@

    Intl.DateTimeFormat.prototype.resolvedOptions ()

    1. Let _options_ be ! ObjectCreate(%ObjectPrototype%). 1. For each row of , except the header row, in table order, do 1. Let _p_ be the Property value of the current row. - 1. If _p_ is `"hour12"`, then + 1. If _p_ is *"hour12"*, then 1. Let _hc_ be _dtf_.[[HourCycle]]. - 1. If _hc_ is `"h11"` or `"h12"`, let _v_ be *true*. - 1. Else if, _hc_ is `"h23"` or `"h24"`, let _v_ be *false*. + 1. If _hc_ is *"h11"* or *"h12"*, let _v_ be *true*. + 1. Else if, _hc_ is *"h23"* or *"h24"*, let _v_ be *false*. 1. Else, let _v_ be *undefined*. 1. Else, 1. Let _v_ be the value of _dtf_'s internal slot whose name is the Internal Slot value of the current row. @@ -691,69 +691,69 @@

    Intl.DateTimeFormat.prototype.resolvedOptions ()

    [[Locale]] - `"locale"` + *"locale"* [[Calendar]] - `"calendar"` + *"calendar"* [[NumberingSystem]] - `"numberingSystem"` + *"numberingSystem"* [[TimeZone]] - `"timeZone"` + *"timeZone"* [[HourCycle]] - `"hourCycle"` + *"hourCycle"* - `"hour12"` + *"hour12"* [[Weekday]] - `"weekday"` + *"weekday"* [[Era]] - `"era"` + *"era"* [[Year]] - `"year"` + *"year"* [[Month]] - `"month"` + *"month"* [[Day]] - `"day"` + *"day"* [[Hour]] - `"hour"` + *"hour"* [[Minute]] - `"minute"` + *"minute"* [[Second]] - `"second"` + *"second"* [[TimeZoneName]] - `"timeZoneName"` + *"timeZoneName"*

    - For web compatibility reasons, if the property hourCycle is set, the hour12 property should be set to *true* when hourCycle is `"h11"` or `"h12"`, or to *false* when hourCycle is `"h23"` or `"h24"`. + For web compatibility reasons, if the property hourCycle is set, the hour12 property should be set to *true* when hourCycle is *"h11"* or *"h12"*, or to *false* when hourCycle is *"h23"* or *"h24"*.

    @@ -761,7 +761,7 @@

    Intl.DateTimeFormat.prototype.resolvedOptions ()

    - For compatibility with versions prior to the fifth edition, the `"hour12"` property is set in addition to the `"hourCycle"` property. + For compatibility with versions prior to the fifth edition, the *"hour12"* property is set in addition to the *"hourCycle"* property. @@ -783,11 +783,11 @@

    Properties of Intl.DateTimeFormat Instances

    • [[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.
    • -
    • [[Calendar]] is a String value with the `"type"` given in Unicode Technical Standard 35 for the calendar used for formatting.
    • -
    • [[NumberingSystem]] is a String value with the `"type"` given in Unicode Technical Standard 35 for the numbering system used for formatting.
    • +
    • [[Calendar]] is a String value with the *"type"* given in Unicode Technical Standard 35 for the calendar used for formatting.
    • +
    • [[NumberingSystem]] is a String value with the *"type"* given in Unicode Technical Standard 35 for the numbering system used for formatting.
    • [[TimeZone]] is a String value with the IANA time zone name of the time zone used for formatting.
    • [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]] are each either *undefined*, indicating that the component is not used for formatting, or one of the String values given in , indicating how the component should be presented in the formatted output.
    • -
    • [[HourCycle]] is a String value indicating whether the 12-hour format (`"h11"`, `"h12"`) or the 24-hour format (`"h23"`, `"h24"`) should be used. `"h11"` and `"h23"` start with hour 0 and go up to 11 and 23 respectively. `"h12"` and `"h24"` start with hour 1 and go up to 12 and 24. [[HourCycle]] is only used when [[Hour]] is not *undefined*.
    • +
    • [[HourCycle]] is a String value indicating whether the 12-hour format (*"h11"*, *"h12"*) or the 24-hour format (*"h23"*, *"h24"*) should be used. *"h11"* and *"h23"* start with hour 0 and go up to 11 and 23 respectively. *"h12"* and *"h24"* start with hour 1 and go up to 12 and 24. [[HourCycle]] is only used when [[Hour]] is not *undefined*.
    • [[Pattern]] is a String value as described in .
    diff --git a/spec/intl.html b/spec/intl.html index c15b1421..315fd9ac 100644 --- a/spec/intl.html +++ b/spec/intl.html @@ -13,7 +13,7 @@

    The Intl Object

    - The Intl object has an internal slot, [[FallbackSymbol]], which is a new %Symbol% in the current realm with the [[Description]] `"IntlLegacyConstructedSymbol"` + The Intl object has an internal slot, [[FallbackSymbol]], which is a new %Symbol% in the current realm with the [[Description]] *"IntlLegacyConstructedSymbol"*

    diff --git a/spec/locale-sensitive-functions.html b/spec/locale-sensitive-functions.html index 526deeff..e1be1d8c 100644 --- a/spec/locale-sensitive-functions.html +++ b/spec/locale-sensitive-functions.html @@ -67,7 +67,7 @@

    String.prototype.toLocaleLowerCase ( [ _locales_ ] )

    1. Let _noExtensionsLocale_ be the String value that is _requestedLocale_ with all Unicode locale extension sequences () removed. 1. Let _availableLocales_ be a List with language tags that includes the languages for which the Unicode Character Database contains language sensitive case mappings. Implementations may add additional language tags if they support case mapping for additional locales. 1. Let _locale_ be BestAvailableLocale(_availableLocales_, _noExtensionsLocale_). - 1. If _locale_ is *undefined*, let _locale_ be `"und"`. + 1. If _locale_ is *undefined*, let _locale_ be *"und"*. 1. Let _cpList_ be a List containing in order the code points of _S_ as defined in ES2020, , starting at the first element of _S_. 1. Let _cuList_ be a List where the elements are the result of a lower case transformation of the ordered code points in _cpList_ according to the Unicode Default Case Conversion algorithm or an implementation defined conversion algorithm. A conforming implementation's lower case transformation algorithm must always yield the same _cpList_ given the same _cuList_ and locale. 1. Let _L_ be a String whose elements are the UTF-16 Encoding (defined in ES2020, ) of the code points of _cuList_. @@ -182,8 +182,8 @@

    Date.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] )

    1. Let _x_ be ? thisTimeValue(*this* value). - 1. If _x_ is *NaN*, return `"Invalid Date"`. - 1. Let _options_ be ? ToDateTimeOptions(_options_, `"any"`, `"all"`). + 1. If _x_ is *NaN*, return *"Invalid Date"*. + 1. Let _options_ be ? ToDateTimeOptions(_options_, *"any"*, *"all"*). 1. Let _dateFormat_ be ? Construct(%DateTimeFormat%, « _locales_, _options_ »). 1. Return ? FormatDateTime(_dateFormat_, _x_). @@ -203,8 +203,8 @@

    Date.prototype.toLocaleDateString ( [ _locales_ [ , _options_ ] ] )

    1. Let _x_ be ? thisTimeValue(*this* value). - 1. If _x_ is *NaN*, return `"Invalid Date"`. - 1. Let _options_ be ? ToDateTimeOptions(_options_, `"date"`, `"date"`). + 1. If _x_ is *NaN*, return *"Invalid Date"*. + 1. Let _options_ be ? ToDateTimeOptions(_options_, *"date"*, *"date"*). 1. Let _dateFormat_ be ? Construct(%DateTimeFormat%, « _locales_, _options_ »). 1. Return ? FormatDateTime(_dateFormat_, _x_). @@ -224,8 +224,8 @@

    Date.prototype.toLocaleTimeString ( [ _locales_ [ , _options_ ] ] )

    1. Let _x_ be ? thisTimeValue(*this* value). - 1. If _x_ is *NaN*, return `"Invalid Date"`. - 1. Let _options_ be ? ToDateTimeOptions(_options_, `"time"`, `"time"`). + 1. If _x_ is *NaN*, return *"Invalid Date"*. + 1. Let _options_ be ? ToDateTimeOptions(_options_, *"time"*, *"time"*). 1. Let _timeFormat_ be ? Construct(%DateTimeFormat%, « _locales_, _options_ »). 1. Return ? FormatDateTime(_timeFormat_, _x_). @@ -249,7 +249,7 @@

    Array.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] )

    1. Let _array_ be ? ToObject(*this* value). - 1. Let _len_ be ? ToLength(? Get(_array_, `"length"`)). + 1. Let _len_ be ? ToLength(? Get(_array_, *"length"*)). 1. Let _separator_ be the String value for the list-separator String appropriate for the host environment's current locale (this is derived in an implementation-defined way). 1. Let _R_ be the empty String. 1. Let _k_ be 0. @@ -258,14 +258,14 @@

    Array.prototype.toLocaleString ( [ _locales_ [ , _options_ ] ] )

    1. Set _R_ to the string-concatenation of _R_ and _separator_. 1. Let _nextElement_ be ? Get(_array_, ! ToString(_k_)). 1. If _nextElement_ is not *undefined* or *null*, then - 1. Let _S_ be ? ToString(? Invoke(_nextElement_, `"toLocaleString"`, « _locales_, _options_ »)). + 1. Let _S_ be ? ToString(? Invoke(_nextElement_, *"toLocaleString"*, « _locales_, _options_ »)). 1. Set _R_ to the string-concatenation of _R_ and _S_. 1. Increase _k_ by 1. 1. Return _R_.
    - This algorithm's steps mirror the steps taken in , with the exception that Invoke(_nextElement_, `"toLocaleString"`) now takes _locales_ and _options_ as arguments. + This algorithm's steps mirror the steps taken in , with the exception that Invoke(_nextElement_, *"toLocaleString"*) now takes _locales_ and _options_ as arguments. diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html index a4bf5eee..d7eda591 100644 --- a/spec/locales-currencies-tz.html +++ b/spec/locales-currencies-tz.html @@ -9,11 +9,11 @@

    Identification of Locales, Currencies, and Time Zones

    Case Sensitivity and Case Mapping

    - The String values used to identify locales, currencies, and time zones are interpreted in a case-insensitive manner, treating the Unicode Basic Latin characters `"A"` to `"Z"` (U+0041 to U+005A) as equivalent to the corresponding Basic Latin characters `"a"` to `"z"` (U+0061 to U+007A). No other case folding equivalences are applied. When mapping to upper case, a mapping shall be used that maps characters in the range `"a"` to `"z"` (U+0061 to U+007A) to the corresponding characters in the range `"A"` to `"Z"` (U+0041 to U+005A) and maps no other characters to the latter range. + The String values used to identify locales, currencies, and time zones are interpreted in a case-insensitive manner, treating the Unicode Basic Latin characters *"A"* to *"Z"* (U+0041 to U+005A) as equivalent to the corresponding Basic Latin characters *"a"* to *"z"* (U+0061 to U+007A). No other case folding equivalences are applied. When mapping to upper case, a mapping shall be used that maps characters in the range *"a"* to *"z"* (U+0061 to U+007A) to the corresponding characters in the range *"A"* to *"Z"* (U+0041 to U+005A) and maps no other characters to the latter range.

    - EXAMPLES `"ß"` (U+00DF) must not match or be mapped to `"SS"` (U+0053, U+0053). `"ı"` (U+0131) must not match or be mapped to `"I"` (U+0049). + EXAMPLES *"ß"* (U+00DF) must not match or be mapped to *"SS"* (U+0053, U+0053). *"ı"* (U+0131) must not match or be mapped to *"I"* (U+0049).

    @@ -32,7 +32,7 @@

    Language Tags

    Unicode Locale Extension Sequences

    - This standard uses the term `"Unicode locale extension sequence"` - as described in `unicode_locale_extensions` in Unicode BCP 47 - for any substring of a language tag that is not part of a private use subtag sequence, starts with a separator `"-"` and the singleton `"u"`, and includes the maximum sequence of following non-singleton subtags and their preceding `"-"` separators. + This standard uses the term *"Unicode locale extension sequence"* - as described in `unicode_locale_extensions` in Unicode BCP 47 - for any substring of a language tag that is not part of a private use subtag sequence, starts with a separator *"-"* and the singleton *"u"*, and includes the maximum sequence of following non-singleton subtags and their preceding *"-"* separators.

    @@ -94,7 +94,7 @@

    IsWellFormedCurrencyCode ( _currency_ )

    1. Let _normalized_ be the result of mapping _currency_ to upper case as described in . 1. If the number of elements in _normalized_ is not 3, return *false*. - 1. If _normalized_ contains any character that is not in the range `"A"` to `"Z"` (U+0041 to U+005A), return *false*. + 1. If _normalized_ contains any character that is not in the range *"A"* to *"Z"* (U+0041 to U+005A), return *false*. 1. Return *true*. @@ -132,8 +132,8 @@

    CanonicalizeTimeZoneName

    1. Let _ianaTimeZone_ be the Zone or Link name of the IANA Time Zone Database such that _timeZone_, converted to upper case as described in , is equal to _ianaTimeZone_, converted to upper case as described in . - 1. If _ianaTimeZone_ is a Link name, let _ianaTimeZone_ be the corresponding Zone name as specified in the `"backward"` file of the IANA Time Zone Database. - 1. If _ianaTimeZone_ is `"Etc/UTC"` or `"Etc/GMT"`, return `"UTC"`. + 1. If _ianaTimeZone_ is a Link name, let _ianaTimeZone_ be the corresponding Zone name as specified in the *"backward"* file of the IANA Time Zone Database. + 1. If _ianaTimeZone_ is *"Etc/UTC"* or *"Etc/GMT"*, return *"UTC"*. 1. Return _ianaTimeZone_. diff --git a/spec/negotiation.html b/spec/negotiation.html index 4ef662e6..3987b4ee 100644 --- a/spec/negotiation.html +++ b/spec/negotiation.html @@ -13,13 +13,13 @@

    Internal slots of Service Constructors

      -
    • [[AvailableLocales]] is a List that contains structurally valid () and canonicalized () BCP 47 language tags identifying the locales for which the implementation provides the functionality of the constructed objects. Language tags on the list must not have a Unicode locale extension sequence. The list must include the value returned by the DefaultLocale abstract operation (), and must not include duplicates. Implementations must include in [[AvailableLocales]] locales that can serve as fallbacks in the algorithm used to resolve locales (see ). For example, implementations that provide a `"de-DE"` locale must include a `"de"` locale that can serve as a fallback for requests such as `"de-AT"` and `"de-CH"`. For locales that in current usage would include a script subtag (such as Chinese locales), old-style language tags without script subtags must be included such that, for example, requests for `"zh-TW"` and `"zh-HK"` lead to output in traditional Chinese rather than the default simplified Chinese. The ordering of the locales within [[AvailableLocales]] is irrelevant.
    • +
    • [[AvailableLocales]] is a List that contains structurally valid () and canonicalized () BCP 47 language tags identifying the locales for which the implementation provides the functionality of the constructed objects. Language tags on the list must not have a Unicode locale extension sequence. The list must include the value returned by the DefaultLocale abstract operation (), and must not include duplicates. Implementations must include in [[AvailableLocales]] locales that can serve as fallbacks in the algorithm used to resolve locales (see ). For example, implementations that provide a *"de-DE"* locale must include a *"de"* locale that can serve as a fallback for requests such as *"de-AT"* and *"de-CH"*. For locales that in current usage would include a script subtag (such as Chinese locales), old-style language tags without script subtags must be included such that, for example, requests for *"zh-TW"* and *"zh-HK"* lead to output in traditional Chinese rather than the default simplified Chinese. The ordering of the locales within [[AvailableLocales]] is irrelevant.
    • [[RelevantExtensionKeys]] is a List of keys of the language tag extensions defined in Unicode Technical Standard 35 that are relevant for the functionality of the constructed objects.
    • [[SortLocaleData]] and [[SearchLocaleData]] (for Intl.Collator) and [[LocaleData]] (for Intl.NumberFormat, Intl.DateTimeFormat, and Intl.PluralRules) are records that have fields for each locale contained in [[AvailableLocales]]. The value of each of these fields must be a record that has fields for each key contained in [[RelevantExtensionKeys]]. The value of each of these fields must be a non-empty list of those values defined in Unicode Technical Standard 35 for the given key that are supported by the implementation for the given locale, with the first element providing the default value.

    - EXAMPLE An implementation of DateTimeFormat might include the language tag `"th"` in its [[AvailableLocales]] internal slot, and must (according to ) include the key `"ca"` in its [[RelevantExtensionKeys]] internal slot. For Thai, the `"buddhist"` calendar is usually the default, but an implementation might also support the calendars `"gregory"`, `"chinese"`, and `"islamicc"` for the locale `"th"`. The [[LocaleData]] internal slot would therefore at least include {[[th]]: {[[ca]]: « `"buddhist"`, `"gregory"`, `"chinese"`, `"islamicc"` »}}. + EXAMPLE An implementation of DateTimeFormat might include the language tag *"th"* in its [[AvailableLocales]] internal slot, and must (according to ) include the key *"ca"* in its [[RelevantExtensionKeys]] internal slot. For Thai, the *"buddhist"* calendar is usually the default, but an implementation might also support the calendars *"gregory"*, *"chinese"*, and *"islamicc"* for the locale *"th"*. The [[LocaleData]] internal slot would therefore at least include {[[th]]: {[[ca]]: « *"buddhist"*, *"gregory"*, *"chinese"*, *"islamicc"* »}}.

    @@ -45,7 +45,7 @@

    CanonicalizeLocaleList ( _locales_ )

    1. Let _O_ be CreateArrayFromList(« _locales_ »). 1. Else, 1. Let _O_ be ? ToObject(_locales_). - 1. Let _len_ be ? ToLength(? Get(_O_, `"length"`)). + 1. Let _len_ be ? ToLength(? Get(_O_, *"length"*)). 1. Let _k_ be 0. 1. Repeat, while _k_ < _len_ 1. Let _Pk_ be ToString(_k_). @@ -66,7 +66,7 @@

    CanonicalizeLocaleList ( _locales_ )

    - Requiring _kValue_ to be a String or Object means that the Number value *NaN* will not be interpreted as the language tag `"nan"`, which stands for Min Nan Chinese. + Requiring _kValue_ to be a String or Object means that the Number value *NaN* will not be interpreted as the language tag *"nan"*, which stands for Min Nan Chinese. @@ -81,8 +81,8 @@

    BestAvailableLocale ( _availableLocales_, _locale_ )

    1. Let _candidate_ be _locale_. 1. Repeat, 1. If _availableLocales_ contains an element equal to _candidate_, return _candidate_. - 1. Let _pos_ be the character index of the last occurrence of `"-"` (U+002D) within _candidate_. If that character does not occur, return *undefined*. - 1. If _pos_ ≥ 2 and the character `"-"` occurs at index _pos_-2 of candidate, decrease _pos_ by 2. + 1. Let _pos_ be the character index of the last occurrence of *"-"* (U+002D) within _candidate_. If that character does not occur, return *undefined*. + 1. If _pos_ ≥ 2 and the character *"-"* occurs at index _pos_-2 of candidate, decrease _pos_ by 2. 1. Let _candidate_ be the substring of _candidate_ from position 0, inclusive, to position _pos_, exclusive.
    @@ -131,7 +131,7 @@

    UnicodeExtensionValue ( _extension_, _key_ )

    1. Assert: The number of elements in _key_ is 2. 1. Let _size_ be the number of elements in _extension_. - 1. Let _searchValue_ be the string-concatenation of `"-"`, _key_, and `"-"`. + 1. Let _searchValue_ be the string-concatenation of *"-"*, _key_, and *"-"*. 1. Let _pos_ be Call(%StringProto_indexOf%, _extension_, « _searchValue_ »). 1. If _pos_ ≠ -1, then 1. Let _start_ be _pos_ + 4. @@ -139,7 +139,7 @@

    UnicodeExtensionValue ( _extension_, _key_ )

    1. Let _k_ be _start_. 1. Let _done_ be *false*. 1. Repeat, while _done_ is *false* - 1. Let _e_ be Call(%StringProto_indexOf%, _extension_, « `"-"`, _k_ »). + 1. Let _e_ be Call(%StringProto_indexOf%, _extension_, « *"-"*, _k_ »). 1. If _e_ = -1, let _len_ be _size_ - _k_; else let _len_ be _e_ - _k_. 1. If _len_ = 2, then 1. Let _done_ be *true*. @@ -150,7 +150,7 @@

    UnicodeExtensionValue ( _extension_, _key_ )

    1. Let _end_ be _e_. 1. Let _k_ be _e_ + 1. 1. Return the String value equal to the substring of _extension_ consisting of the code units at indices _start_ (inclusive) through _end_ (exclusive). - 1. Let _searchValue_ be the string-concatenation of `"-"` and _key_. + 1. Let _searchValue_ be the string-concatenation of *"-"* and _key_. 1. Let _pos_ be Call(%StringProto_indexOf%, _extension_, « _searchValue_ »). 1. If _pos_ ≠ -1 and _pos_ + 3 = _size_, then 1. Return the empty String. @@ -158,7 +158,7 @@

    UnicodeExtensionValue ( _extension_, _key_ )

    - Non-normative summary: UnicodeExtensionValue returns the type subtags of the first keyword for a given key. For example, UnicodeExtensionValue(`"u-ca-ethiopic-amete-alem-ca-ethioaa"`, `"ca"`) returns `"ethiopic-amete-alem"`. If the keyword for _key_ has no type subtags, UnicodeExtensionValue returns the empty String. If _extension_ contains no keyword for _key_, *undefined* is returned. + Non-normative summary: UnicodeExtensionValue returns the type subtags of the first keyword for a given key. For example, UnicodeExtensionValue(*"u-ca-ethiopic-amete-alem-ca-ethioaa"*, *"ca"*) returns *"ethiopic-amete-alem"*. If the keyword for _key_ has no type subtags, UnicodeExtensionValue returns the empty String. If _extension_ contains no keyword for _key_, *undefined* is returned. @@ -175,14 +175,14 @@

    ResolveLocale ( _availableLocales_, _requestedLocales_, _options_, _relevant 1. Let _matcher_ be _options_.[[localeMatcher]]. - 1. If _matcher_ is `"lookup"`, then + 1. If _matcher_ is *"lookup"*, then 1. Let _r_ be LookupMatcher(_availableLocales_, _requestedLocales_). 1. Else, 1. Let _r_ be BestFitMatcher(_availableLocales_, _requestedLocales_). 1. Let _foundLocale_ be _r_.[[locale]]. 1. Let _result_ be a new Record. 1. Set _result_.[[dataLocale]] to _foundLocale_. - 1. Let _supportedExtension_ be `"-u"`. + 1. Let _supportedExtension_ be *"-u"*. 1. For each element _key_ of _relevantExtensionKeys_ in List order, do 1. Let _foundLocaleData_ be _localeData_.[[<_foundLocale_>]]. 1. Assert: Type(_foundLocaleData_) is Record. @@ -190,28 +190,28 @@

    ResolveLocale ( _availableLocales_, _requestedLocales_, _options_, _relevant 1. Assert: Type(_keyLocaleData_) is List. 1. Let _value_ be _keyLocaleData_[0]. 1. Assert: Type(_value_) is either String or Null. - 1. Let _supportedExtensionAddition_ be `""`. + 1. Let _supportedExtensionAddition_ be *""*. 1. If _r_ has an [[extension]] field, then 1. Let _requestedValue_ be UnicodeExtensionValue(_r_.[[extension]], _key_). 1. If _requestedValue_ is not *undefined*, then 1. If _requestedValue_ is not the empty String, then 1. If _keyLocaleData_ contains _requestedValue_, then 1. Let _value_ be _requestedValue_. - 1. Let _supportedExtensionAddition_ be the string-concatenation of `"-"`, _key_, `"-"`, and _value_. - 1. Else if _keyLocaleData_ contains `"true"`, then - 1. Let _value_ be `"true"`. - 1. Let _supportedExtensionAddition_ be the string-concatenation of `"-"` and _key_. + 1. Let _supportedExtensionAddition_ be the string-concatenation of *"-"*, _key_, *"-"*, and _value_. + 1. Else if _keyLocaleData_ contains *"true"*, then + 1. Let _value_ be *"true"*. + 1. Let _supportedExtensionAddition_ be the string-concatenation of *"-"* and _key_. 1. If _options_ has a field [[<_key_>]], then 1. Let _optionsValue_ be _options_.[[<_key_>]]. 1. Assert: Type(_optionsValue_) is either String, Undefined, or Null. 1. If _keyLocaleData_ contains _optionsValue_, then 1. If SameValue(_optionsValue_, _value_) is *false*, then 1. Let _value_ be _optionsValue_. - 1. Let _supportedExtensionAddition_ be `""`. + 1. Let _supportedExtensionAddition_ be *""*. 1. Set _result_.[[<_key_>]] to _value_. 1. Append _supportedExtensionAddition_ to _supportedExtension_. 1. If the number of elements in _supportedExtension_ is greater than 2, then - 1. Let _privateIndex_ be Call(%StringProto_indexOf%, _foundLocale_, « `"-x-"` »). + 1. Let _privateIndex_ be Call(%StringProto_indexOf%, _foundLocale_, « *"-x-"* »). 1. If _privateIndex_ = -1, then 1. Let _foundLocale_ be the string-concatenation of _foundLocale_ and _supportedExtension_. 1. Else, @@ -264,9 +264,9 @@

    SupportedLocales ( _availableLocales_, _requestedLocales_, _options_ )

    1. If _options_ is not *undefined*, then 1. Let _options_ be ? ToObject(_options_). - 1. Let _matcher_ be ? GetOption(_options_, `"localeMatcher"`, `"string"`, « `"lookup"`, `"best fit"` », `"best fit"`). - 1. Else, let _matcher_ be `"best fit"`. - 1. If _matcher_ is `"best fit"`, then + 1. Let _matcher_ be ? GetOption(_options_, *"localeMatcher"*, *"string"*, « *"lookup"*, *"best fit"* », *"best fit"*). + 1. Else, let _matcher_ be *"best fit"*. + 1. If _matcher_ is *"best fit"*, then 1. Let _supportedLocales_ be BestFitSupportedLocales(_availableLocales_, _requestedLocales_). 1. Else, 1. Let _supportedLocales_ be LookupSupportedLocales(_availableLocales_, _requestedLocales_). @@ -284,10 +284,10 @@

    GetOption ( _options_, _property_, _type_, _values_, _fallback_ )

    1. Let _value_ be ? Get(_options_, _property_). 1. If _value_ is not *undefined*, then - 1. Assert: _type_ is `"boolean"` or `"string"`. - 1. If _type_ is `"boolean"`, then + 1. Assert: _type_ is *"boolean"* or *"string"*. + 1. If _type_ is *"boolean"*, then 1. Let _value_ be ToBoolean(_value_). - 1. If _type_ is `"string"`, then + 1. If _type_ is *"string"*, then 1. Let _value_ be ? ToString(_value_). 1. If _values_ is not *undefined*, then 1. If _values_ does not contain an element equal to _value_, throw a *RangeError* exception. @@ -331,30 +331,30 @@

    PartitionPattern ( _pattern_ )

    The PartitionPattern abstract operation is called with argument _pattern_. This abstract operation parses an abstract pattern string into a list of Records with two fields, [[Type]] and [[Value]]. - The [[Value]] field will be a String value if [[Type]] is `"literal"`, and *undefined* otherwise. + The [[Value]] field will be a String value if [[Type]] is *"literal"*, and *undefined* otherwise. The syntax of the abstract pattern strings is an implementation detail and is not exposed to users of ECMA-402. The following steps are taken:

    1. Let _result_ be a new empty List. - 1. Let _beginIndex_ be ! Call(%String.prototype.indexOf%, _pattern_, « `"{"`, 0 »). + 1. Let _beginIndex_ be ! Call(%String.prototype.indexOf%, _pattern_, « *"{"*, 0 »). 1. Let _endIndex_ be 0. 1. Let _nextIndex_ be 0. 1. Let _length_ be the number of code units in _pattern_. 1. Repeat, while _beginIndex_ is an integer index into _pattern_ - 1. Set _endIndex_ to ! Call(%String.prototype.indexOf%, _pattern_, « `"}"`, _beginIndex_ »). + 1. Set _endIndex_ to ! Call(%String.prototype.indexOf%, _pattern_, « *"}"*, _beginIndex_ »). 1. Assert: _endIndex_ is greater than _beginIndex_. 1. If _beginIndex_ is greater than _nextIndex_, then 1. Let _literal_ be a substring of _pattern_ from position _nextIndex_, inclusive, to position _beginIndex_, exclusive. - 1. Add new part record { [[Type]]: `"literal"`, [[Value]]: _literal_ } as a new element of the list _result_. + 1. Add new part record { [[Type]]: *"literal"*, [[Value]]: _literal_ } as a new element of the list _result_. 1. Let _p_ be the substring of _pattern_ from position _beginIndex_, exclusive, to position _endIndex_, exclusive. 1. Add new part record { [[Type]]: _p_, [[Value]]: *undefined* } as a new element of the list _result_. 1. Set _nextIndex_ to _endIndex_ + 1. - 1. Set _beginIndex_ to ! Call(%String.prototype.indexOf%, _pattern_, « `"{"`, _nextIndex_ »). + 1. Set _beginIndex_ to ! Call(%String.prototype.indexOf%, _pattern_, « *"{"*, _nextIndex_ »). 1. If _nextIndex_ is less than _length_, then 1. Let _literal_ be the substring of _pattern_ from position _nextIndex_, exclusive, to position _length_, exclusive. - 1. Add new part record { [[Type]]: `"literal"`, [[Value]]: _literal_ } as a new element of the list _result_. + 1. Add new part record { [[Type]]: *"literal"*, [[Value]]: _literal_ } as a new element of the list _result_. 1. Return _result_. diff --git a/spec/numberformat.html b/spec/numberformat.html index 809c913d..e67c5aa3 100644 --- a/spec/numberformat.html +++ b/spec/numberformat.html @@ -16,12 +16,12 @@

    SetNumberFormatDigitOptions ( _intlObj_, _options_, _mnfdDefault_, _mxfdDefa 1. Assert: Type(_options_) is Object. 1. Assert: Type(_mnfdDefault_) is Number. 1. Assert: Type(_mxfdDefault_) is Number. - 1. Let _mnid_ be ? GetNumberOption(_options_, `"minimumIntegerDigits"`, 1, 21, 1). - 1. Let _mnfd_ be ? GetNumberOption(_options_, `"minimumFractionDigits"`, 0, 20, _mnfdDefault_). + 1. Let _mnid_ be ? GetNumberOption(_options_, *"minimumIntegerDigits"*, 1, 21, 1). + 1. Let _mnfd_ be ? GetNumberOption(_options_, *"minimumFractionDigits"*, 0, 20, _mnfdDefault_). 1. Let _mxfdActualDefault_ be max( _mnfd_, _mxfdDefault_ ). - 1. Let _mxfd_ be ? GetNumberOption(_options_, `"maximumFractionDigits"`, _mnfd_, 20, _mxfdActualDefault_). - 1. Let _mnsd_ be ? Get(_options_, `"minimumSignificantDigits"`). - 1. Let _mxsd_ be ? Get(_options_, `"maximumSignificantDigits"`). + 1. Let _mxfd_ be ? GetNumberOption(_options_, *"maximumFractionDigits"*, _mnfd_, 20, _mxfdActualDefault_). + 1. Let _mnsd_ be ? Get(_options_, *"minimumSignificantDigits"*). + 1. Let _mxsd_ be ? Get(_options_, *"maximumSignificantDigits"*). 1. Set _intlObj_.[[MinimumIntegerDigits]] to _mnid_. 1. Set _intlObj_.[[MinimumFractionDigits]] to _mnfd_. 1. Set _intlObj_.[[MaximumFractionDigits]] to _mxfd_. @@ -47,36 +47,36 @@

    InitializeNumberFormat ( _numberFormat_, _locales_, _options_ )

    1. Else, 1. Let _options_ be ? ToObject(_options_). 1. Let _opt_ be a new Record. - 1. Let _matcher_ be ? GetOption(_options_, `"localeMatcher"`, `"string"`, « `"lookup"`, `"best fit"` », `"best fit"`). + 1. Let _matcher_ be ? GetOption(_options_, *"localeMatcher"*, *"string"*, « *"lookup"*, *"best fit"* », *"best fit"*). 1. Set _opt_.[[localeMatcher]] to _matcher_. 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]]. 1. Set _numberFormat_.[[NumberingSystem]] to _r_.[[nu]]. 1. Let _dataLocale_ be _r_.[[dataLocale]]. - 1. Let _style_ be ? GetOption(_options_, `"style"`, `"string"`, « `"decimal"`, `"percent"`, `"currency"` », `"decimal"`). + 1. Let _style_ be ? GetOption(_options_, *"style"*, *"string"*, « *"decimal"*, *"percent"*, *"currency"* », *"decimal"*). 1. Set _numberFormat_.[[Style]] to _style_. - 1. Let _currency_ be ? GetOption(_options_, `"currency"`, `"string"`, *undefined*, *undefined*). + 1. Let _currency_ be ? GetOption(_options_, *"currency"*, *"string"*, *undefined*, *undefined*). 1. If _currency_ is not *undefined*, then 1. If the result of IsWellFormedCurrencyCode(_currency_) is *false*, throw a *RangeError* exception. - 1. If _style_ is `"currency"` and _currency_ is *undefined*, throw a *TypeError* exception. - 1. If _style_ is `"currency"`, then + 1. If _style_ is *"currency"* and _currency_ is *undefined*, throw a *TypeError* exception. + 1. If _style_ is *"currency"*, then 1. Let _currency_ be the result of converting _currency_ to upper case as specified in . 1. Set _numberFormat_.[[Currency]] to _currency_. 1. Let _cDigits_ be CurrencyDigits(_currency_). - 1. Let _currencyDisplay_ be ? GetOption(_options_, `"currencyDisplay"`, `"string"`, « `"code"`, `"symbol"`, `"name"` », `"symbol"`). - 1. If _style_ is `"currency"`, set _numberFormat_.[[CurrencyDisplay]] to _currencyDisplay_. - 1. If _style_ is `"currency"`, then + 1. Let _currencyDisplay_ be ? GetOption(_options_, *"currencyDisplay"*, *"string"*, « *"code"*, *"symbol"*, *"name"* », *"symbol"*). + 1. If _style_ is *"currency"*, set _numberFormat_.[[CurrencyDisplay]] to _currencyDisplay_. + 1. If _style_ is *"currency"*, then 1. Let _mnfdDefault_ be _cDigits_. 1. Let _mxfdDefault_ be _cDigits_. 1. Else, 1. Let _mnfdDefault_ be 0. - 1. If _style_ is `"percent"`, then + 1. If _style_ is *"percent"*, then 1. Let _mxfdDefault_ be 0. 1. Else, 1. Let _mxfdDefault_ be 3. 1. Perform ? SetNumberFormatDigitOptions(_numberFormat_, _options_, _mnfdDefault_, _mxfdDefault_). - 1. Let _useGrouping_ be ? GetOption(_options_, `"useGrouping"`, `"boolean"`, *undefined*, *true*). + 1. Let _useGrouping_ be ? GetOption(_options_, *"useGrouping"*, *"boolean"*, *undefined*, *true*). 1. Set _numberFormat_.[[UseGrouping]] to _useGrouping_. 1. Let _dataLocaleData_ be _localeData_.[[<_dataLocale_>]]. 1. Let _patterns_ be _dataLocaleData_.[[patterns]]. @@ -152,23 +152,23 @@

    PartitionNumberPattern ( _numberFormat_, _x_ )

    1. Let _patternParts_ be PartitionPattern(_pattern_). 1. For each element _patternPart_ of _patternParts_, in List order, do 1. Let _p_ be _patternPart_.[[Type]]. - 1. If _p_ is `"literal"`, then - 1. Add new part record { [[Type]]: `"literal"`, [[Value]]: _patternPart_.[[Value]] } as a new element of _result_. - 1. If _p_ is equal to `"number"`, then + 1. If _p_ is *"literal"*, then + 1. Add new part record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]] } as a new element of _result_. + 1. If _p_ is equal to *"number"*, then 1. If _x_ is *NaN*, then 1. Let _n_ be an implementation- and locale-dependent (ILD) String value indicating the *NaN* value. - 1. Append a new Record { [[Type]]: `"nan"`, [[Value]]: _n_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"nan"*, [[Value]]: _n_ } as the last element of _result_. 1. Else if _x_ is not a finite Number or BigInt, 1. Let _n_ be an ILD String value indicating infinity. - 1. Append a new Record { [[Type]]: `"infinity"`, [[Value]]: _n_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"infinity"*, [[Value]]: _n_ } as the last element of _result_. 1. Else, - 1. If _numberFormat_.[[Style]] is `"percent"`, let _x_ be 100 × _x_. + 1. If _numberFormat_.[[Style]] is *"percent"*, let _x_ be 100 × _x_. 1. Let _n_ be FormatNumericToString(_numberFormat_, _x_). - 1. If the _numberFormat_.[[NumberingSystem]] matches one of the values in the `"Numbering System"` column of below, then - 1. Let _digits_ be a List whose 10 String valued elements are the UTF-16 string representations of the 10 _digits_ specified in the `"Digits"` column of the matching row in . + 1. If the _numberFormat_.[[NumberingSystem]] matches one of the values in the *"Numbering System"* column of below, then + 1. Let _digits_ be a List whose 10 String valued elements are the UTF-16 string representations of the 10 _digits_ specified in the *"Digits"* column of the matching row in . 1. Replace each _digit_ in _n_ with the value of _digits_[_digit_]. 1. Else use an implementation dependent algorithm to map _n_ to the appropriate representation of _n_ in the given numbering system. - 1. Let _decimalSepIndex_ be Call(%StringProto_indexOf%, _n_, « `"."`, 0 »). + 1. Let _decimalSepIndex_ be Call(%StringProto_indexOf%, _n_, « *"."*, 0 »). 1. If _decimalSepIndex_ > 0, then 1. Let _integer_ be the substring of _n_ from position 0, inclusive, to position _decimalSepIndex_, exclusive. 1. Let _fraction_ be the substring of _n_ from position _decimalSepIndex_, exclusive, to the end of _n_. @@ -181,37 +181,37 @@

    PartitionNumberPattern ( _numberFormat_, _x_ )

    1. Assert: The number of elements in _groups_ List is greater than 0. 1. Repeat, while _groups_ List is not empty 1. Remove the first element from _groups_ and let _integerGroup_ be the value of that element. - 1. Append a new Record { [[Type]]: `"integer"`, [[Value]]: _integerGroup_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"integer"*, [[Value]]: _integerGroup_ } as the last element of _result_. 1. If _groups_ List is not empty, then - 1. Append a new Record { [[Type]]: `"group"`, [[Value]]: _groupSepSymbol_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"group"*, [[Value]]: _groupSepSymbol_ } as the last element of _result_. 1. Else, - 1. Append a new Record { [[Type]]: `"integer"`, [[Value]]: _integer_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"integer"*, [[Value]]: _integer_ } as the last element of _result_. 1. If _fraction_ is not *undefined*, then 1. Let _decimalSepSymbol_ be the ILND String representing the decimal separator. - 1. Append a new Record { [[Type]]: `"decimal"`, [[Value]]: _decimalSepSymbol_ } as the last element of _result_. - 1. Append a new Record { [[Type]]: `"fraction"`, [[Value]]: _fraction_ } as the last element of _result_. - 1. Else if _p_ is equal to `"plusSign"`, then + 1. Append a new Record { [[Type]]: *"decimal"*, [[Value]]: _decimalSepSymbol_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"fraction"*, [[Value]]: _fraction_ } as the last element of _result_. + 1. Else if _p_ is equal to *"plusSign"*, then 1. Let _plusSignSymbol_ be the ILND String representing the plus sign. - 1. Append a new Record { [[Type]]: `"plusSign"`, [[Value]]: _plusSignSymbol_ } as the last element of _result_. - 1. Else if _p_ is equal to `"minusSign"`, then + 1. Append a new Record { [[Type]]: *"plusSign"*, [[Value]]: _plusSignSymbol_ } as the last element of _result_. + 1. Else if _p_ is equal to *"minusSign"*, then 1. Let _minusSignSymbol_ be the ILND String representing the minus sign. - 1. Append a new Record { [[Type]]: `"minusSign"`, [[Value]]: _minusSignSymbol_ } as the last element of _result_. - 1. Else if _p_ is equal to `"percentSign"` and _numberFormat_.[[Style]] is `"percent"`, then + 1. Append a new Record { [[Type]]: *"minusSign"*, [[Value]]: _minusSignSymbol_ } as the last element of _result_. + 1. Else if _p_ is equal to *"percentSign"* and _numberFormat_.[[Style]] is *"percent"*, then 1. Let _percentSignSymbol_ be the ILND String representing the percent sign. - 1. Append a new Record { [[Type]]: `"percentSign"`, [[Value]]: _percentSignSymbol_ } as the last element of _result_. - 1. Else if _p_ is equal to `"currency"` and _numberFormat_.[[Style]] is `"currency"`, then + 1. Append a new Record { [[Type]]: *"percentSign"*, [[Value]]: _percentSignSymbol_ } as the last element of _result_. + 1. Else if _p_ is equal to *"currency"* and _numberFormat_.[[Style]] is *"currency"*, then 1. Let _currency_ be _numberFormat_.[[Currency]]. - 1. Assert: _numberFormat_.[[CurrencyDisplay]] is `"code"`, `"symbol"` or `"name"`. - 1. If _numberFormat_.[[CurrencyDisplay]] is `"code"`, then + 1. Assert: _numberFormat_.[[CurrencyDisplay]] is *"code"*, *"symbol"* or *"name"*. + 1. If _numberFormat_.[[CurrencyDisplay]] is *"code"*, then 1. Let _cd_ be _currency_. - 1. Else if _numberFormat_.[[CurrencyDisplay]] is `"symbol"`, then + 1. Else if _numberFormat_.[[CurrencyDisplay]] is *"symbol"*, then 1. Let _cd_ be an ILD String value representing _currency_ in short form. If the implementation does not have such a representation of _currency_, use _currency_ itself. - 1. Else if _numberFormat_.[[CurrencyDisplay]] is `"name"`, then + 1. Else if _numberFormat_.[[CurrencyDisplay]] is *"name"*, then 1. Let _cd_ be an ILD String value representing _currency_ in long form. If the implementation does not have such a representation of _currency_, use _currency_ itself. - 1. Append a new Record { [[Type]]: `"currency"`, [[Value]]: _cd_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"currency"*, [[Value]]: _cd_ } as the last element of _result_. 1. Else, 1. Let _unknown_ be an ILND String based on _x_ and _p_. - 1. Append a new Record { [[Type]]: `"unknown"`, [[Value]]: _unknown_ } as the last element of _result_. + 1. Append a new Record { [[Type]]: *"unknown"*, [[Value]]: _unknown_ } as the last element of _result_. 1. Return _result_.
    @@ -353,8 +353,8 @@

    FormatNumericToParts( _numberFormat_, _x_ )

    1. Let _n_ be 0. 1. For each _part_ in _parts_, do 1. Let _O_ be ObjectCreate(%ObjectPrototype%). - 1. Perform ! CreateDataPropertyOrThrow(_O_, `"type"`, _part_.[[Type]]). - 1. Perform ! CreateDataPropertyOrThrow(_O_, `"value"`, _part_.[[Value]]). + 1. Perform ! CreateDataPropertyOrThrow(_O_, *"type"*, _part_.[[Type]]). + 1. Perform ! CreateDataPropertyOrThrow(_O_, *"value"*, _part_.[[Value]]). 1. Perform ! CreateDataPropertyOrThrow(_result_, ! ToString(_n_), _O_). 1. Increment _n_ by 1. 1. Return _result_. @@ -371,25 +371,25 @@

    ToRawPrecision( _x_, _minPrecision_, _maxPrecision_ )

    1. Let _p_ be _maxPrecision_. 1. If _x_ = 0, then - 1. Let _m_ be the String consisting of _p_ occurrences of the character `"0"`. + 1. Let _m_ be the String consisting of _p_ occurrences of the character *"0"*. 1. Let _e_ be 0. 1. Else, 1. Let _e_ and _n_ be integers such that 10_p_–1 ≤ _n_ < 10_p_ and for which the exact mathematical value of _n_ × 10_e_–_p_+1 – _x_ is as close to zero as possible. If there are two such sets of _e_ and _n_, pick the _e_ and _n_ for which _n_ × 10_e_–_p_+1 is larger. 1. Let _m_ be the String consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). 1. If _e_ ≥ _p_, then - 1. Return the string-concatenation of _m_ and _e_-_p_+1 occurrences of the character `"0"`. + 1. Return the string-concatenation of _m_ and _e_-_p_+1 occurrences of the character *"0"*. 1. If _e_ = _p_-1, then 1. Return _m_. 1. If _e_ ≥ 0, then - 1. Let _m_ be the string-concatenation of the first _e_+1 characters of _m_, the character `"."`, and the remaining _p_–(_e_+1) characters of _m_. + 1. Let _m_ be the string-concatenation of the first _e_+1 characters of _m_, the character *"."*, and the remaining _p_–(_e_+1) characters of _m_. 1. If _e_ < 0, then - 1. Let _m_ be the string-concatenation of the String value `"0."`, –(_e_+1) occurrences of the character `"0"`, and _m_. - 1. If _m_ contains the character `"."`, and _maxPrecision_ > _minPrecision_, then + 1. Let _m_ be the string-concatenation of the String value *"0."*, –(_e_+1) occurrences of the character *"0"*, and _m_. + 1. If _m_ contains the character *"."*, and _maxPrecision_ > _minPrecision_, then 1. Let _cut_ be _maxPrecision_ – _minPrecision_. - 1. Repeat, while _cut_ > 0 and the last character of _m_ is `"0"` + 1. Repeat, while _cut_ > 0 and the last character of _m_ is *"0"* 1. Remove the last character from _m_. 1. Decrease _cut_ by 1. - 1. If the last character of _m_ is `"."`, then + 1. If the last character of _m_ is *"."*, then 1. Remove the last character from _m_. 1. Return _m_. @@ -405,25 +405,25 @@

    ToRawFixed( _x_, _minInteger_, _minFraction_, _maxFraction_ )

    1. Let _f_ be _maxFraction_. 1. Let _n_ be an integer for which the exact mathematical value of _n_ ÷ 10_f_ – _x_ is as close to zero as possible. If there are two such _n_, pick the larger _n_. - 1. If _n_ = 0, let _m_ be the String `"0"`. Otherwise, let _m_ be the String consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). + 1. If _n_ = 0, let _m_ be the String *"0"*. Otherwise, let _m_ be the String consisting of the digits of the decimal representation of _n_ (in order, with no leading zeroes). 1. If _f_ ≠ 0, then 1. Let _k_ be the number of characters in _m_. 1. If _k_ ≤ _f_, then - 1. Let _z_ be the String value consisting of _f_+1–_k_ occurrences of the character `"0"`. + 1. Let _z_ be the String value consisting of _f_+1–_k_ occurrences of the character *"0"*. 1. Let _m_ be the string-concatenation of _z_ and _m_. 1. Let _k_ be _f_+1. 1. Let _a_ be the first _k_–_f_ characters of _m_, and let _b_ be the remaining _f_ characters of _m_. - 1. Let _m_ be the string-concatenation of _a_, `"."`, and _b_. + 1. Let _m_ be the string-concatenation of _a_, *"."*, and _b_. 1. Let _int_ be the number of characters in _a_. 1. Else, let _int_ be the number of characters in _m_. 1. Let _cut_ be _maxFraction_ – _minFraction_. - 1. Repeat, while _cut_ > 0 and the last character of _m_ is `"0"` + 1. Repeat, while _cut_ > 0 and the last character of _m_ is *"0"* 1. Remove the last character from _m_. 1. Decrease _cut_ by 1. - 1. If the last character of _m_ is `"."`, then + 1. If the last character of _m_ is *"."*, then 1. Remove the last character from _m_. 1. If _int_ < _minInteger_, then - 1. Let _z_ be the String consisting of _minInteger_–_int_ occurrences of the character `"0"`. + 1. Let _z_ be the String consisting of _minInteger_–_int_ occurrences of the character *"0"*. 1. Let _m_ be the string-concatenation of _z_ and _m_. 1. Return _m_. @@ -470,7 +470,7 @@

    Intl.NumberFormat ( [ _locales_ [ , _options_ ] ] )

    1. If NewTarget is *undefined*, let _newTarget_ be the active function object, else let _newTarget_ be NewTarget. - 1. Let _numberFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, `"%NumberFormatPrototype%"`, « [[InitializedNumberFormat]], [[Locale]], [[NumberingSystem]], [[Style]], [[Currency]], [[CurrencyDisplay]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[UseGrouping]], [[PositivePattern]], [[NegativePattern]], [[BoundFormat]] »). + 1. Let _numberFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%NumberFormatPrototype%"*, « [[InitializedNumberFormat]], [[Locale]], [[NumberingSystem]], [[Style]], [[Currency]], [[CurrencyDisplay]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]], [[UseGrouping]], [[PositivePattern]], [[NegativePattern]], [[BoundFormat]] »). 1. Perform ? InitializeNumberFormat(_numberFormat_, _locales_, _options_). @@ -532,11 +532,11 @@

    Internal slots

    - The value of the [[RelevantExtensionKeys]] internal slot is « `"nu"` ». + The value of the [[RelevantExtensionKeys]] internal slot is « *"nu"* ».

    - Unicode Technical Standard 35 describes two locale extension keys that are relevant to number formatting, `"nu"` for numbering system and `"cu"` for currency. Intl.NumberFormat, however, requires that the currency of a currency format is specified through the currency property in the options objects. + Unicode Technical Standard 35 describes two locale extension keys that are relevant to number formatting, *"nu"* for numbering system and *"cu"* for currency. Intl.NumberFormat, however, requires that the currency of a currency format is specified through the currency property in the options objects.

    @@ -544,8 +544,8 @@

    Internal slots

      -
    • The list that is the value of the `"nu"` field of any locale field of [[LocaleData]] must not include the values `"native"`, `"traditio"`, or `"finance"`.
    • -
    • [[LocaleData]].[[<_locale_>]] must have a patterns field for all locale values _locale_. The value of this field must be a record, which must have fields with the names of the three number format styles: `"decimal"`, `"percent"`, and `"currency"`. Each of these fields in turn must be a record with the fields positivePattern and negativePattern. The value of these fields must be string values that must contain the substring `"{number}"` and may contain the substrings `"{plusSign}"`, and `"{minusSign}"`; the values within the percent field must also contain the substring `"{percentSign}"`; the values within the currency field must also contain the substring `"{currency}"`. The pattern strings must not contain any characters in the General Category "Number, decimal digit" as specified by the Unicode Standard.
    • +
    • The list that is the value of the *"nu"* field of any locale field of [[LocaleData]] must not include the values *"native"*, *"traditio"*, or *"finance"*.
    • +
    • [[LocaleData]].[[<_locale_>]] must have a patterns field for all locale values _locale_. The value of this field must be a record, which must have fields with the names of the three number format styles: *"decimal"*, *"percent"*, and *"currency"*. Each of these fields in turn must be a record with the fields positivePattern and negativePattern. The value of these fields must be string values that must contain the substring *"{number}"* and may contain the substrings *"{plusSign}"*, and *"{minusSign}"*; the values within the percent field must also contain the substring *"{percentSign}"*; the values within the currency field must also contain the substring *"{currency}"*. The pattern strings must not contain any characters in the General Category "Number, decimal digit" as specified by the Unicode Standard.
    @@ -573,7 +573,7 @@

    Intl.NumberFormat.prototype.constructor

    Intl.NumberFormat.prototype [ @@toStringTag ]

    - The initial value of the @@toStringTag property is the String value `"Object"`. + The initial value of the @@toStringTag property is the String value *"Object"*.

    This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }. @@ -650,47 +650,47 @@

    Intl.NumberFormat.prototype.resolvedOptions ()

    [[Locale]] - `"locale"` + *"locale"* [[NumberingSystem]] - `"numberingSystem"` + *"numberingSystem"* [[Style]] - `"style"` + *"style"* [[Currency]] - `"currency"` + *"currency"* [[CurrencyDisplay]] - `"currencyDisplay"` + *"currencyDisplay"* [[MinimumIntegerDigits]] - `"minimumIntegerDigits"` + *"minimumIntegerDigits"* [[MinimumFractionDigits]] - `"minimumFractionDigits"` + *"minimumFractionDigits"* [[MaximumFractionDigits]] - `"maximumFractionDigits"` + *"maximumFractionDigits"* [[MinimumSignificantDigits]] - `"minimumSignificantDigits"` + *"minimumSignificantDigits"* [[MaximumSignificantDigits]] - `"maximumSignificantDigits"` + *"maximumSignificantDigits"* [[UseGrouping]] - `"useGrouping"` + *"useGrouping"* @@ -715,9 +715,9 @@

    Properties of Intl.NumberFormat Instances

    • [[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.
    • [[NumberingSystem]] is a String value with the "type" given in Unicode Technical Standard 35 for the numbering system used for formatting.
    • -
    • [[Style]] is one of the String values `"decimal"`, `"currency"`, or `"percent"`, identifying the number format style used.
    • -
    • [[Currency]] is a String value with the currency code identifying the currency to be used if formatting with the `"currency"` style. It is only used when [[Style]] has the value `"currency"`.
    • -
    • [[CurrencyDisplay]] is one of the String values `"code"`, `"symbol"`, or `"name"`, specifying whether to display the currency as an ISO 4217 alphabetic currency code, a localized currency symbol, or a localized currency name if formatting with the `"currency"` style. It is only used when [[Style]] has the value `"currency"`.
    • +
    • [[Style]] is one of the String values *"decimal"*, *"currency"*, or *"percent"*, identifying the number format style used.
    • +
    • [[Currency]] is a String value with the currency code identifying the currency to be used if formatting with the *"currency"* style. It is only used when [[Style]] has the value *"currency"*.
    • +
    • [[CurrencyDisplay]] is one of the String values *"code"*, *"symbol"*, or *"name"*, specifying whether to display the currency as an ISO 4217 alphabetic currency code, a localized currency symbol, or a localized currency name if formatting with the *"currency"* style. It is only used when [[Style]] has the value *"currency"*.
    • [[MinimumIntegerDigits]] is a non-negative integer Number value indicating the minimum integer digits to be used. Numbers will be padded with leading zeroes if necessary.
    • [[MinimumFractionDigits]] and [[MaximumFractionDigits]] are non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary.
    • [[MinimumSignificantDigits]] and [[MaximumSignificantDigits]] are positive integer Number values indicating the minimum and maximum fraction digits to be shown. Either none or both of these properties are present; if they are, they override minimum and maximum integer and fraction digits – the formatter uses however many integer and fraction digits are required to display the specified number of significant digits.
    • diff --git a/spec/pluralrules.html b/spec/pluralrules.html index edef82aa..694f6081 100644 --- a/spec/pluralrules.html +++ b/spec/pluralrules.html @@ -18,9 +18,9 @@

      InitializePluralRules ( _pluralRules_, _locales_, _options_ )

      1. Else 1. Let _options_ be ? ToObject(_options_). 1. Let _opt_ be a new Record. - 1. Let _matcher_ be ? GetOption(_options_, `"localeMatcher"`, `"string"`, « `"lookup"`, `"best fit"` », `"best fit"`). + 1. Let _matcher_ be ? GetOption(_options_, *"localeMatcher"*, *"string"*, « *"lookup"*, *"best fit"* », *"best fit"*). 1. Set _opt_.[[localeMatcher]] to _matcher_. - 1. Let _t_ be ? GetOption(_options_, `"type"`, `"string"`, « `"cardinal"`, `"ordinal"` », `"cardinal"`). + 1. Let _t_ be ? GetOption(_options_, *"type"*, *"string"*, « *"cardinal"*, *"ordinal"* », *"cardinal"*). 1. Set _pluralRules_.[[Type]] to _t_. 1. Perform ? SetNumberFormatDigitOptions(_pluralRules_, _options_, *0*, *3*). 1. Let _localeData_ be %PluralRules%.[[LocaleData]]. @@ -41,7 +41,7 @@

      GetOperands ( _s_ )

      1. Assert: Type(_s_) is String. 1. Let _n_ be ! ToNumber(_s_). 1. Assert: _n_ is finite. - 1. Let _dp_ be ! Call(%StringProto_indexOf%, _s_, « `"."` »). + 1. Let _dp_ be ! Call(%StringProto_indexOf%, _s_, « *"."* »). 1. If _dp_ = -1, then 1. Set _iv_ to _n_. 1. Let _f_ be 0. @@ -53,7 +53,7 @@

      GetOperands ( _s_ )

      1. Let _v_ be the length of _fv_. 1. Let _i_ be abs(! ToNumber(_iv_)). 1. If _f_ ≠ 0, then - 1. Let _ft_ be the value of _fv_ stripped of trailing `"0"`. + 1. Let _ft_ be the value of _fv_ stripped of trailing *"0"*. 1. Let _w_ be the length of _ft_. 1. Let _t_ be ! ToNumber(_ft_). 1. Else, @@ -112,7 +112,7 @@

      GetOperands ( _s_ )

      PluralRuleSelect ( _locale_, _type_, _n_, _operands_ )

      - When the PluralRuleSelect abstract operation is called with four arguments, it performs an implementation-dependent algorithm to map _n_ to the appropriate plural representation of the Plural Rules Operands Record _operands_ by selecting the rules denoted by _type_ for the corresponding _locale_, or the String value `"other"`. + When the PluralRuleSelect abstract operation is called with four arguments, it performs an implementation-dependent algorithm to map _n_ to the appropriate plural representation of the Plural Rules Operands Record _operands_ by selecting the rules denoted by _type_ for the corresponding _locale_, or the String value *"other"*.

      @@ -128,7 +128,7 @@

      ResolvePlural ( _pluralRules_, _n_ )

      1. Assert: _pluralRules_ has an [[InitializedPluralRules]] internal slot. 1. Assert: Type(_n_) is Number. 1. If _n_ is not a finite Number, then - 1. Return `"other"`. + 1. Return *"other"*. 1. Let _locale_ be _pluralRules_.[[Locale]]. 1. Let _type_ be _pluralRules_.[[Type]]. 1. Let _s_ be ! FormatNumericToString(_pluralRules_, _n_). @@ -156,7 +156,7 @@

      Intl.PluralRules ( [ _locales_ [ , _options_ ] ] )

      1. If NewTarget is *undefined*, throw a *TypeError* exception. - 1. Let _pluralRules_ be ? OrdinaryCreateFromConstructor(NewTarget, `"%PluralRulesPrototype%"`, « [[InitializedPluralRules]], [[Locale]], [[Type]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]] »). + 1. Let _pluralRules_ be ? OrdinaryCreateFromConstructor(NewTarget, *"%PluralRulesPrototype%"*, « [[InitializedPluralRules]], [[Locale]], [[Type]], [[MinimumIntegerDigits]], [[MinimumFractionDigits]], [[MaximumFractionDigits]], [[MinimumSignificantDigits]], [[MaximumSignificantDigits]] »). 1. Return ? InitializePluralRules(_pluralRules_, _locales_, _options_). @@ -243,7 +243,7 @@

      Intl.PluralRules.prototype.constructor

      Intl.PluralRules.prototype [ @@toStringTag ]

      - The initial value of the @@toStringTag property is the String value `"Object"`. + The initial value of the @@toStringTag property is the String value *"Object"*.

      This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }. @@ -281,8 +281,8 @@

      Intl.PluralRules.prototype.resolvedOptions ()

      1. Let _v_ be the value of _pr_'s internal slot whose name is the Internal Slot value of the current row. 1. If _v_ is not *undefined*, then 1. Perform ! CreateDataPropertyOrThrow(_options_, _p_, _v_). - 1. Let _pluralCategories_ be a List of Strings representing the possible results of PluralRuleSelect for the selected locale _pr_.[[Locale]]. This List consists of unique String values, from the the list `"zero"`, `"one"`, `"two"`, `"few"`, `"many"` and `"other"`, that are relevant for the locale whose localization is specified in LDML Language Plural Rules. - 1. Perform ! CreateDataProperty(_options_, `"pluralCategories"`, CreateArrayFromList(_pluralCategories_)). + 1. Let _pluralCategories_ be a List of Strings representing the possible results of PluralRuleSelect for the selected locale _pr_.[[Locale]]. This List consists of unique String values, from the the list *"zero"*, *"one"*, *"two"*, *"few"*, *"many"* and *"other"*, that are relevant for the locale whose localization is specified in LDML Language Plural Rules. + 1. Perform ! CreateDataProperty(_options_, *"pluralCategories"*, CreateArrayFromList(_pluralCategories_)). 1. Return _options_. @@ -297,31 +297,31 @@

      Intl.PluralRules.prototype.resolvedOptions ()

      [[Locale]] - `"locale"` + *"locale"* [[Type]] - `"type"` + *"type"* [[MinimumIntegerDigits]] - `"minimumIntegerDigits"` + *"minimumIntegerDigits"* [[MinimumFractionDigits]] - `"minimumFractionDigits"` + *"minimumFractionDigits"* [[MaximumFractionDigits]] - `"maximumFractionDigits"` + *"maximumFractionDigits"* [[MinimumSignificantDigits]] - `"minimumSignificantDigits"` + *"minimumSignificantDigits"* [[MaximumSignificantDigits]] - `"maximumSignificantDigits"` + *"maximumSignificantDigits"* @@ -345,7 +345,7 @@

      Properties of Intl.PluralRules Instances

      • [[Locale]] is a String value with the language tag of the locale whose localization is used by the plural rules.
      • -
      • [[Type]] is one of the String values `"cardinal"` or `"ordinal"`, identifying the plural rules used.
      • +
      • [[Type]] is one of the String values *"cardinal"* or *"ordinal"*, identifying the plural rules used.
      • [[MinimumIntegerDigits]] is a non-negative integer Number value indicating the minimum integer digits to be used.
      • [[MinimumFractionDigits]] and [[MaximumFractionDigits]] are non-negative integer Number values indicating the minimum and maximum fraction digits to be used. Numbers will be rounded or padded with trailing zeroes if necessary.
      • [[MinimumSignificantDigits]] and [[MaximumSignificantDigits]] are positive integer Number values indicating the minimum and maximum fraction digits to be used. Either none or both of these properties are present; if they are, they override minimum and maximum integer and fraction digits.