[Webkit-unassigned] [Bug 231041] New: DateTimeFormat.resolvedOptions shouldn't return an object with other date/time properties if dateStyle or timeStyle are set
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 30 15:57:13 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=231041
Bug ID: 231041
Summary: DateTimeFormat.resolvedOptions shouldn't return an
object with other date/time properties if dateStyle or
timeStyle are set
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: philip.chimento at gmail.com
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.
--
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/20210930/2e339f49/attachment-0001.htm>
More information about the webkit-unassigned
mailing list