WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
275745
[JSC] `Intl.DurationFormat` nfOptions.roundingMode for seconds / microseconds / nanoseconds should be "trunc"
https://bugs.webkit.org/show_bug.cgi?id=275745
Summary
[JSC] `Intl.DurationFormat` nfOptions.roundingMode for seconds / microseconds...
Sosuke Suzuki
Reported
2024-06-21 12:28:39 PDT
``` const duration = { seconds: 1, milliseconds: 500, }; function sameValue(a, b) { if (a !== b) { throw new Error(`expected ${b} but got ${a}`) } } const df = new Intl.DurationFormat("en", { seconds: "numeric", fractionalDigits: 0 }); sameValue(df.format(duration), "1"); // but got "2" since we use "rounding-mode-half-up" ```
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-06-28 12:29:12 PDT
<
rdar://problem/130771643
>
Sosuke Suzuki
Comment 2
2024-07-30 10:32:17 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/31477
EWS
Comment 3
2024-08-07 13:36:10 PDT
Committed
281955@main
(55784d54785e): <
https://commits.webkit.org/281955@main
> Reviewed commits have been landed. Closing PR #31477 and removing active labels.
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