RESOLVED FIXED 195974
Intl.DateTimeFormat should obey 2-digit hour
https://bugs.webkit.org/show_bug.cgi?id=195974
Summary Intl.DateTimeFormat should obey 2-digit hour
Shane Carr
Reported 2019-03-19 16:09:38 PDT
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
Attachments
Patch (4.99 KB, patch)
2019-03-25 17:12 PDT, Andy VanWagoner
no flags
Archive of layout-test-results from ews100 for mac-highsierra (2.74 MB, application/zip)
2019-03-25 17:53 PDT, EWS Watchlist
no flags
Patch (7.27 KB, patch)
2019-03-25 18:30 PDT, Andy VanWagoner
no flags
Radar WebKit Bug Importer
Comment 1 2019-03-21 20:18:18 PDT
Andy VanWagoner
Comment 2 2019-03-25 17:12:51 PDT
EWS Watchlist
Comment 3 2019-03-25 17:53:16 PDT
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
EWS Watchlist
Comment 4 2019-03-25 17:53:17 PDT
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
Andy VanWagoner
Comment 5 2019-03-25 18:30:45 PDT
Keith Miller
Comment 6 2019-03-26 12:08:05 PDT
Comment on attachment 365935 [details] Patch r=me.
WebKit Commit Bot
Comment 7 2019-03-26 12:18:52 PDT
Comment on attachment 365935 [details] Patch Clearing flags on attachment: 365935 Committed r243512: <https://trac.webkit.org/changeset/243512>
WebKit Commit Bot
Comment 8 2019-03-26 12:18:54 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.