Bug 274733
| Summary: | [JSC] `Intl.DurationFormat#resolvedOptions().fractionalDigits` should be `undefined` if `fractionalDigits` is `undefined`. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sosuke Suzuki <sosuke> |
| Component: | JavaScriptCore | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/29128
EWS
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
<rdar://problem/128990476>