Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Normative: Add numberingSystem option bag entry
Browse files Browse the repository at this point in the history
Analogy to tc39/ecma402#175
  • Loading branch information
littledan committed Apr 23, 2019
1 parent f9fb38c commit 9e26ff0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/relativetimeformat.html
Expand Up @@ -21,12 +21,16 @@ <h1>InitializeRelativeTimeFormat ( _relativeTimeFormat_, _locales_, _options_ )<
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 _numberingSystem_ be ? GetOption(_options_, `"numberingSystem"`, `"string"`, *undefined*, *undefined*).
1. If _numberingSystem_ is not *undefined*, then
1. If _numberingSystem_ does not match the `(3*8alphanum) *("-" (3*8alphanum))` sequence, throw a *RangeError* exception.
1. Set _opt_.[[nu]] to _numberingSystem_.
1. Set _opt_.[[LocaleMatcher]] to _matcher_.
1. Let _localeData_ be %RelativeTimeFormat%.[[LocaleData]].
1. Let _r_ be ResolveLocale(%RelativeTimeFormat%.[[AvailableLocales]], _requestedLocales_, _opt_, %RelativeTimeFormat%.[[RelevantExtensionKeys]], _localeData_).
1. Let _locale_ be _r_.[[Locale]].
1. Set _relativeTimeFormat_.[[Locale]] to _locale_.
1. Set _relativeTimeFormat_.[[NumberingSystem]] to r_.[[nu]].
1. Set _relativeTimeFormat_.[[NumberingSystem]] to _r_.[[nu]].
1. Let _dataLocale_ be _r_.[[DataLocale]].
1. Let _s_ be ? GetOption(_options_, `"style"`, `"string"`, «`"long"`, `"short"`, `"narrow"`», `"long"`).
1. Set _relativeTimeFormat_.[[Style]] to _s_.
Expand Down

0 comments on commit 9e26ff0

Please sign in to comment.