Closed
Bug 1093421
Opened 10 years ago
Closed 9 years ago
new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", currencyDisplay: "name" }).format(5) shouldn't throw
Categories
(Core :: JavaScript: Internationalization API, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
Attachments
(1 file)
But it does right now for some reason. The "symbol" display type works, but neither "name" nor "code" do. I suspect it's a CLDR issue of some sort, given the exact same code path is used for all three cases. Either that or we're misusing ICU somehow. Investigation needed.
Assignee | ||
Comment 1•10 years ago
|
||
Turns out unum_open flat-out doesn't support UNUM_CURRENCY_PLURAL or UNUM_CURRENCY_ISO. (Or at least not in the ICU we embed, haven't checked newer.) Fun. In searching to see how others use these enums, I also discovered Norbert stumbled across this awhile ago: http://sourceforge.net/p/icu/mailman/message/30777490/
Comment 2•10 years ago
|
||
According to Norbert updating to ICU53 should resolve this issue (bug 866372, bug 992079, bug 1075758).
Assignee | ||
Comment 3•9 years ago
|
||
The upgrade to ICU 55 fixed this, just need to land a test. I have not tryservered this to see what b2g with its potential system-icu makes of this. Obviously that'll need to happen before landing.
Attachment #8628155 -
Flags: review?(andrebargull)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
Comment on attachment 8628155 [details] [diff] [review] Add a test for support for currencyDisplay: 'name' or 'code' when formatting numbers Review of attachment 8628155 [details] [diff] [review]: ----------------------------------------------------------------- The new test looks ok to me, but why was 'js/src/tests/Intl/NumberFormat/format.js' removed?
Attachment #8628155 -
Flags: review?(andrebargull) → review+
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to André Bargull from comment #4) > The new test looks ok to me, but why was > 'js/src/tests/Intl/NumberFormat/format.js' removed? Clearly because I r dumb. Reverted before landing.
Comment 7•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/dd057afbe61a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•