| Summary: | Intl.DateTimeFormat should obey 2-digit hour | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Shane Carr <sffc> | ||||||||
| Component: | JavaScriptCore | Assignee: | Andy VanWagoner <andy> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | andy, ap, commit-queue, ews-watchlist, keith_miller, mark.lam, mmaxfield, msaboff, rniwa, saam, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Safari 12 | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 365923 [details]
Patch
Comment on attachment 365923 [details] Patch Attachment 365923 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11666408 New failing tests: js/intl-datetimeformat.html Created attachment 365929 [details]
Archive of layout-test-results from ews100 for mac-highsierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 365935 [details]
Patch
Comment on attachment 365935 [details]
Patch
r=me.
Comment on attachment 365935 [details] Patch Clearing flags on attachment: 365935 Committed r243512: <https://trac.webkit.org/changeset/243512> All reviewed patches have been landed. Closing bug. |
The following code has unexpected results. new Intl.DateTimeFormat('ru', {hour:'2-digit', minute: '2-digit', hour12: false}).format(new Date(2015, 8, 1, 3, 0, 0)) new Intl.DateTimeFormat('ru', {hour:'2-digit', minute: '2-digit', hour12: true}).format(new Date(2015, 8, 1, 3, 0, 0)) The expected output is: 03:00 03:00 AM (or a Cyrillic alternative to "AM") Safari leaves off the leading 0 digit. Screenshot: https://user-images.githubusercontent.com/1235286/54647595-1e093780-4ab4-11e9-971d-a12c32b41e18.png The bug was reported in ECMA 402: https://github.com/tc39/ecma402/issues/283 Chrome and Firefox had similar issues which are being tracked. Chrome has a fix ready to merge. https://bugs.chromium.org/p/chromium/issues/detail?id=527926 https://bugzilla.mozilla.org/show_bug.cgi?id=1284868