[Webkit-unassigned] [Bug 275745] New: [JSC] `Intl.DurationFormat` nfOptions.roundingMode for seconds / microseconds / nanoseconds should be "trunc"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 21 12:28:39 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=275745
Bug ID: 275745
Summary: [JSC] `Intl.DurationFormat` nfOptions.roundingMode for
seconds / microseconds / nanoseconds should be "trunc"
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Images
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aosukeke at gmail.com
CC: sabouhallawa at apple.com
```
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"
```
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240621/405f821f/attachment.htm>
More information about the webkit-unassigned
mailing list