New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 694429 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Intl API formats date not in the specified format

Reported by final.te...@gmail.com, Feb 21 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0

Steps to reproduce the problem:
1. Provide a UTC-based date in the official date format and construct it via JavaScript’s Date() function.
2. Convert the UTC-based date to a localDateString and replace the original with it in the DOM
3. Get an incorrect date format

What is the expected behavior?
The date format is expected to be displayed in the following way for the United Kingdom:

- Short: dd/MM/y
- Medium: d MMM y
- Long: d MMMM y
- Full: EEEE, d MMMM y

This means that, as Firefox, Safari and other browsers display correctly, the datestring "2017-05-02T00:00:00+00:00" should be turned into "02/05/2017". Instead, Chrome returns just "2017-5-2".

What went wrong?
The date format is expected to be displayed in the following way for the United Kingdom, according to the system settings of macOS:

- Short: dd/MM/y
- Medium: d MMM y
- Long: d MMMM y
- Full: EEEE, d MMMM y

This means that, as Firefox, Safari and other browsers display correctly, the datestring "2017-05-02T00:00:00+00:00" should be turned into "02/05/2017". Instead, Chrome returns just "2017-5-2", which is not specified anywhere.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 58.0.3018.0 (Official Build) canary (64-bit)  Channel: canary
OS Version: OS X 10.12
Flash Version: 

Tested in Chrome stable as well as in Canary.

 
Can’t see the test case attachment anymore so I’m re-attaching it.
testindex.html
1.2 KB View Download

Comment 2 by phistuck@gmail.com, Feb 21 2017

If I change toLocaleDateString(); to toLocaleDateString('en-gb'); - it shows the expected string.

Comment 3 by phistuck@gmail.com, Feb 21 2017

(I do that because my locale is not United Kingdom)

Comment 4 by ajha@chromium.org, Feb 27 2017

Labels: Needs-Triage-M58

Comment 5 by rbyers@chromium.org, Feb 27 2017

Components: -Blink>JavaScript Blink>JavaScript>Internationalization
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on Mac 10.12.2 , Windows 7 & Ubuntu 14.04 using chrome reported version- 58.0.3018.0,stable-56.0.2924.87 & latest Canary-58.0.3025.0 as per the steps mentioned in comment#0 & comment#1.

Observed same behaviour on Safari,firefox & chrome as the date format displayed in the format of "02/05/2017".
Please find the attached screencast for reference & let us know if we miss anything to reproduce the issue.
Thank you!!
694429.mp4
385 KB View Download
Cc: sureshkumari@chromium.org
Gentle ping!
final.technologies@ could you please respond on comment#6 and update the thread.

Thanks.
final.technologies@ could you please respond on comment#6 and update the thread.

Thanks.

Comment 9 by phistuck@gmail.com, Mar 20 2017

#6, 7, 8 -
Did you set your system locale to United Kingdom?
Status: WontFix (was: Unconfirmed)
WontFix until we get a response from the author.

Sign in to add a comment