WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 209774
226297
Safari's Intl.NumberFormat currencyDisplay doesn't support narrowSymbol
https://bugs.webkit.org/show_bug.cgi?id=226297
Summary
Safari's Intl.NumberFormat currencyDisplay doesn't support narrowSymbol
Matt Gross
Reported
2021-05-26 14:53:37 PDT
Hey team! This issue has come up in a few places around the web, but I haven't seen a WebKit bug for it yet. In other browsers, and per the Intl spec, `currencyDisplay` should accept the `narrowSymbol` option. `Intl.NumberFormat('fr-CA', { style: 'currency', currency: 'CAD', currencyDisplay: 'narrowSymbol' }).format(12345);` should return "12 345,00 $" but in Safari it throws the following error: `RangeError: currencyDisplay must be either "code", "symbol", or "name"` Spec on MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#parameters
ECMA 2020 Spec:
https://402.ecma-international.org/7.0/#sec-setnumberformatunitoptions
It would be great to get support for this!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-06-02 14:54:19 PDT
<
rdar://problem/78784118
>
Yusuke Suzuki
Comment 2
2021-06-03 10:09:09 PDT
This is implemented in Safari 14.1 on Big Sur / iOS 14.5 Safari. *** This bug has been marked as a duplicate of
bug 209774
***
Matt Gross
Comment 3
2021-06-03 11:09:06 PDT
TY! I just updated to 14.1 & saw it start working :)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug