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

Issue 794392 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Intl.DateTimeFormat incorrectly formats month

Reported by clement....@gmail.com, Dec 13 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce the problem:
for (let i = 0; i < 12; i++)
{ 
   console.log(new Intl.DateTimeFormat("en-US", {month: "long"}).format(new Date(2000, i, 1))); 
}

What is the expected behavior?
Should display all months of the year exactly once.

What went wrong?
Notice that April is displayed as March instead.

Did this work before? N/A 

Chrome version: 62.0.3202.94  Channel: stable
OS Version: 10.0
Flash Version: 

I filed another bug related to the Intl date api, which was fixed since then. It turned out to be related to my computer configured timezone (Sydney/Australia).
I'm not sure if this bug also affects this timezone specifically or all timezones.
 
Weirdly, it works for year of 2007 and above.
2006 and above actually
More weird. It works correctly in IE/Edge, but Firefox exhibits the exact same bug.
Components: -Blink Blink>JavaScript>Internationalization
Cc: krajshree@chromium.org
Labels: Triaged-ET Needs-Triage-M62 Needs-Feedback
clement.gutel@ - Thanks for filing the issue...!!

Could you please provide a sample test file to test the issue from TE-end.
This will help us in triaging the issue further.

Thanks...!!
Hi,

Not sure what you mean by TE, but the following code sample is enough to reproduce the issue.

for (let i = 0; i < 12; i++)
{ 
   console.log(new Intl.DateTimeFormat("en-US", {month: "long"}).format(new Date(2000, i, 1))); 
}
Project Member

Comment 7 by sheriffbot@chromium.org, Dec 13 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
clement.gutel@ - Thanks for your reply...!!

Unable to reproduce the issue on Win-10 and mac 10.12.6 using chrome reported version #62.0.3202.94, latest stable #63.0.3239.84 and latest canary #65.0.3292.0.

Attached a screen shot for reference.

Following are the steps followed to reproduce the issue.
------------
1. Opened dev tools console in chrome.
2. Pasted the code at comment #0 and observed that all months of the year displayed exactly once without any issues.

reporter@ - Could you please check the issue on latest stable #63.0.3239.84 by creating a new profile without any apps and extensions and please let us know if the issue still persist or not.

Thanks...!!
794392.PNG
402 KB View Download
Ok, I tried tweaking the time zone in my windows 7 machine, and this impacts this bug.

Following results occur in Incognito window

Canberra, Melbourne, Sydney => bug occurs
Pacific Time (US & Canada) => it's even worse. April is showing March, and November is showing October.
Central America => correct behaviour
UTC => correct behaviour

I'm pretty sure it's related to daylight savings. There must be a bug causing the daylight offset to be added to April 1st 00:00 causing it to move to March 31st 23:00, or something like that.

See this other bug I reported earlier this year, which was quite similar and was fixed.
https://bugs.chromium.org/p/chromium/issues/detail?id=722821
This may provide some good pointers.
See attached screenshot
Capture.PNG
11.8 KB View Download
Project Member

Comment 11 by sheriffbot@chromium.org, Dec 13 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: M-65
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Win-10 using chrome reported version #62.0.3202.94 and latest canary #65.0.3293.0 as per comment #9.
Issue is not seen in OS-Mac and Linux.
This is a non-regression issue as it is observed from M50 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Ah! Excellent!
Status: Available (was: Untriaged)
Project Member

Comment 15 by sheriffbot@chromium.org, Jan 2

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment