[Webkit-unassigned] [Bug 195974] New: Intl.DateTimeFormat should obey 2-digit hour

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 19 16:09:38 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=195974

            Bug ID: 195974
           Summary: Intl.DateTimeFormat should obey 2-digit hour
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sffc at chromium.org

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

-- 
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/20190319/fe8511a4/attachment.html>


More information about the webkit-unassigned mailing list