WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 231041
[JSC] DateTimeFormat.resolvedOptions shouldn't return an object with other date/time properties if dateStyle or timeStyle are set
https://bugs.webkit.org/show_bug.cgi?id=231041
Summary
[JSC] DateTimeFormat.resolvedOptions shouldn't return an object with other da...
Philip Chimento
Reported
2021-09-30 15:57:13 PDT
According to the specification for Intl.DateTimeFormat.prototype.resolvedOptions() (
https://tc39.es/ecma402/#sec-intl.datetimeformat.prototype.resolvedoptions
) step 5.d, none of the properties in Table 4 (weekday, era, year, month, day, dayPeriod, hour, minute, second, fractionalSecondDigits, timeZoneName) should be present on the returned object if dateStyle or timeStyle are present. JavaScriptCore currently does not implement this step correctly:
> new Intl.DateTimeFormat('en', {dateStyle:'short'}).resolvedOptions().year
"2-digit" This means you currently cannot always pass the object returned from resolvedOptions() back into the DateTimeFormat constructor as the options argument, for one thing.
Attachments
Patch
(7.80 KB, patch)
2021-10-02 14:51 PDT
,
Yusuke Suzuki
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kevin Neal
Comment 1
2021-10-01 14:31:12 PDT
Thank you for filing. The appropriate engineers have been notified.
Radar WebKit Bug Importer
Comment 2
2021-10-01 14:31:27 PDT
<
rdar://problem/83782481
>
Yusuke Suzuki
Comment 3
2021-10-02 14:51:22 PDT
Created
attachment 439973
[details]
Patch
Ross Kirsling
Comment 4
2021-10-02 16:33:21 PDT
Comment on
attachment 439973
[details]
Patch r=me, but we should make sure this gets captured in test262.
EWS
Comment 5
2021-10-02 19:13:26 PDT
Committed
r283460
(
242439@main
): <
https://commits.webkit.org/242439@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 439973
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug