-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add Unified Intl.NumberFormat proposal to ECMA-402. #404
Conversation
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.
This looks great. Approved, other than one small fix.
Localized symbols for compact and scientific notation (<emu-xref href="#sec-formatnumber"></emu-xref>) | ||
</li> | ||
<li> | ||
Localized <ins>narrow, short, and long</ins> currency symbols <del>and names</del> (<emu-xref href="#sec-formatnumber"></emu-xref>) |
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.
left the <ins>
and <del>
@@ -131,7 +131,8 @@ <h1>ResolvePlural ( _pluralRules_, _n_ )</h1> | |||
1. Return *"other"*. | |||
1. Let _locale_ be _pluralRules_.[[Locale]]. | |||
1. Let _type_ be _pluralRules_.[[Type]]. | |||
1. Let _s_ be ! FormatNumericToString(_pluralRules_, _n_). | |||
1. Let _res_ be ! FormatNumericToString(_pluralRules_, _n_). | |||
1. Let _s_ be _res_.[[FormattedString]] |
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.
1. Let _s_ be _res_.[[FormattedString]] | |
1. Let _s_ be _res_.[[FormattedString]]. |
1. Assert: _notation_ is *"compact"*. | ||
1. Let _compactDisplay_ be _numberFormat_.[[CompactDisplay]]. | ||
1. Let _compactPatterns_ be _notationSubPatterns_.[[compact]].[[>_compactDisplay_<]]. | ||
1. Return _compactPatterns_.[[_exponent_]]. |
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.
1. Return _compactPatterns_.[[_exponent_]]. | |
1. Return _compactPatterns_.[[<_exponent_>]]. |
TC39 approved this for Stage 4 today, February 5, 2019. I will address the comments here and then we should be in the clear to merge. |
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.
LGTM after the other changes requested are addressed. They are minor changes only so I can apply them directly in a quick follow up. I'll have it prepared before merging.
1. Else if _exponent_ is not 0, then | ||
1. Assert: _notation_ is *"compact"*. | ||
1. Let _compactDisplay_ be _numberFormat_.[[CompactDisplay]]. | ||
1. Let _compactPatterns_ be _notationSubPatterns_.[[compact]].[[>_compactDisplay_<]]. |
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.
typo on the >
and <
ordering
This PR is to merge the Unified Intl.NumberFormat proposal into ECMA-402, pending final Stage 4 approval.
https://github.com/tc39/proposal-unified-intl-numberformat