Bug 246646

Summary: [JSC] Intl.NumberFormat ignores maximumFractionDigits with compact notation (both currency and decimal)
Product: WebKit Reporter: Max Starets <mstarets>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: cunha.pedro.m, karlcow, mmaxfield, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari 16   
Hardware: Mac (Intel)   
OS: macOS 12   
See Also: https://bugs.webkit.org/show_bug.cgi?id=147605

Max Starets
Reported 2022-10-17 13:08:18 PDT
To reproduce, try the following: new Intl.NumberFormat('en-US', {style: 'currency', currency: 'USD', notation: 'compact', maximumFractionDigits: 2, compactDisplay: 'long'}).format(97896) Safari output: "$98K" Firefox and Chrome output: "$97.90K" new Intl.NumberFormat('en-US', {style: 'decimal', notation: 'compact', maximumFractionDigits: 2, compactDisplay: 'long'}).format(97896) Safari output: "98 thousand" Firefox and Chrome output: "97.9 thousand"
Attachments
Karl Dubost
Comment 1 2022-10-17 22:28:10 PDT
Yusuke Suzuki
Comment 2 2022-10-18 10:10:48 PDT
(In reply to Karl Dubost from comment #1) > There is also no tests on WPT covering this: Intl.NumberFormat > https://wpt.fyi/results/ > ?label=master&label=experimental&aligned&view=subtest&q=maximumfractiondigits Intl.NumberFormat is not web API. It is test262's job to cover that.
Yusuke Suzuki
Comment 3 2022-10-18 10:24:23 PDT
We should apply the spec side change.
Radar WebKit Bug Importer
Comment 4 2022-10-18 10:28:31 PDT
Yusuke Suzuki
Comment 5 2022-10-18 10:34:40 PDT
EWS
Comment 6 2022-10-18 12:32:00 PDT
Committed 255691@main (9c113c3fb2ab): <https://commits.webkit.org/255691@main> Reviewed commits have been landed. Closing PR #5501 and removing active labels.
Yusuke Suzuki
Comment 7 2022-12-18 23:41:30 PST
*** Bug 249231 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.