Bug 274733

Summary: [JSC] `Intl.DurationFormat#resolvedOptions().fractionalDigits` should be `undefined` if `fractionalDigits` is `undefined`.
Product: WebKit Reporter: Sosuke Suzuki <sosuke>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Sosuke Suzuki
Reported 2024-05-26 14:02:58 PDT
According to the spec[1], when creating a `DurationFormat` instance with `new Intl.DurationFormat(locales, { fractionalDigits: undefined });`, `Intl.DurationFormat#resolvedOptions().fractionalDigits` should be `undefined`. However, in the current JSC, it is `0`. This was occurring because, according to the spec[2], the `fallback` argument of the `GetNumberOption` abstract operation should be `undefined`, but we were passing `0`. [1]: https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat.prototype.resolvedOptions [2]: https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat
Attachments
Sosuke Suzuki
Comment 1 2024-05-26 14:04:52 PDT
EWS
Comment 2 2024-05-30 00:48:55 PDT
Committed 279503@main (a43717459fdb): <https://commits.webkit.org/279503@main> Reviewed commits have been landed. Closing PR #29128 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2024-05-30 00:49:13 PDT
Note You need to log in before you can comment on or make changes to this bug.