Bug 274733 - [JSC] `Intl.DurationFormat#resolvedOptions().fractionalDigits` should be `undefined` if `fractionalDigits` is `undefined`.
Summary: [JSC] `Intl.DurationFormat#resolvedOptions().fractionalDigits` should be `und...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-05-26 14:02 PDT by Sosuke Suzuki
Modified: 2024-05-30 00:49 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sosuke Suzuki 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
Comment 1 Sosuke Suzuki 2024-05-26 14:04:52 PDT
Pull request: https://github.com/WebKit/WebKit/pull/29128
Comment 2 EWS 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.
Comment 3 Radar WebKit Bug Importer 2024-05-30 00:49:13 PDT
<rdar://problem/128990476>