Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normative: When formatting currency values, only use data on the number of minor units used to display that currency when using standard notation. #925

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ <h1>Intl.NumberFormat ( [ _locales_ [ , _options_ ] ] )</h1>
1. Let _style_ be _numberFormat_.[[Style]].
1. If _style_ is *"currency"*, then
1. Let _currency_ be _numberFormat_.[[Currency]].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the line " Let currency be numberFormat.[[Currency]]." not inside the same if block of

          1. Let _cDigits_ be CurrencyDigits(_currency_).
          1. Let _mnfdDefault_ be _cDigits_.
          1. Let _mxfdDefault_ be _cDigits_.

Nowhere else need the value of currency in this AO, right?

1. Let _notation_ be ? GetOption(_options_, *"notation"*, ~string~, « *"standard"*, *"scientific"*, *"engineering"*, *"compact"* », *"standard"*).
1. Set _numberFormat_.[[Notation]] to _notation_.
1. If _style_ is *"currency"* and *"notation"* is *"standard"*, then
1. Let _cDigits_ be CurrencyDigits(_currency_).
1. Let _mnfdDefault_ be _cDigits_.
1. Let _mxfdDefault_ be _cDigits_.
Expand All @@ -44,8 +47,6 @@ <h1>Intl.NumberFormat ( [ _locales_ [ , _options_ ] ] )</h1>
1. Let _mxfdDefault_ be 0.
1. Else,
1. Let _mxfdDefault_ be 3.
1. Let _notation_ be ? GetOption(_options_, *"notation"*, ~string~, « *"standard"*, *"scientific"*, *"engineering"*, *"compact"* », *"standard"*).
1. Set _numberFormat_.[[Notation]] to _notation_.
1. Perform ? SetNumberFormatDigitOptions(_numberFormat_, _options_, _mnfdDefault_, _mxfdDefault_, _notation_).
1. Let _compactDisplay_ be ? GetOption(_options_, *"compactDisplay"*, ~string~, « *"short"*, *"long"* », *"short"*).
1. Let _defaultUseGrouping_ be *"auto"*.
Expand Down
Loading