-
Notifications
You must be signed in to change notification settings - Fork 108
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
Conversation
…er of minor units used to display that currency when using standard notation. Previously this data was inappropriately used to set the number of fractional digits displayed when formatting currency values in scientific, engineering, and compact notations. See issue tc39#912.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it when the fix is so simple!
P.S. We should also try to cover this in test262. |
(EDIT: wrong issue) |
I believe this is presented to Oct TC39 meeting and still waiting for Mozilla to express their opinion. |
@@ -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]]. |
There was a problem hiding this comment.
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?
Achieved consensus at October 24 TC39 plenary |
Spec: tc39/ecma402#925 Bug: 372731679 Change-Id: I7c7bd4974f21c64a3905eb817983636941f410d5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5925080 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#96641}
…ncy" style and "compact", "engineering", and "scientific" notations. Related PR: tc39/ecma402#925
…ncy" style and "compact", "engineering", and "scientific" notations. Related PR: tc39/ecma402#925
…ncy" style and "compact", "engineering", and "scientific" notations. Related PR: tc39/ecma402#925
…ncy" style and "compact", "engineering", and "scientific" notations. Related PR: tc39/ecma402#925
…spidermonkey-reviewers,dminor Implement the changes from <tc39/ecma402#925>. Test coverage: <tc39/test262#4274> Differential Revision: https://phabricator.services.mozilla.com/D228589
…spidermonkey-reviewers,dminor Implement the changes from <tc39/ecma402#925>. Test coverage: <tc39/test262#4274> Differential Revision: https://phabricator.services.mozilla.com/D228589
Previously this data was inappropriately used to set the number of fractional digits displayed when formatting currency values in scientific, engineering, and compact notations. Fix #912.