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.
,
Dec 13 2017
2006 and above actually
,
Dec 13 2017
More weird. It works correctly in IE/Edge, but Firefox exhibits the exact same bug.
,
Dec 13 2017
,
Dec 13 2017
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...!!
,
Dec 13 2017
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)));
}
,
Dec 13 2017
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
,
Dec 13 2017
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...!!
,
Dec 13 2017
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.
,
Dec 13 2017
See attached screenshot
,
Dec 13 2017
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
,
Dec 14 2017
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...!!
,
Dec 14 2017
Ah! Excellent!
,
Jan 2 2018
,
Jan 2
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
,
Jan 7
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by clement....@gmail.com
, Dec 13 2017