RESOLVED FIXED275745
[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
Radar WebKit Bug Importer
Comment 1 2024-06-28 12:29:12 PDT
Sosuke Suzuki
Comment 2 2024-07-30 10:32:17 PDT
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.