Closed
Bug 1385643
Opened 7 years ago
Closed 6 years ago
Intl.DateTimeFormat().format returns wrong month names for some historical dates
Categories
(Core :: JavaScript: Standard Library, defect, P5)
Tracking
()
RESOLVED
DUPLICATE
of bug 1346211
Tracking | Status | |
---|---|---|
firefox57 | --- | affected |
People
(Reporter: kontakt, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16251
Steps to reproduce:
1. Set your timezone to Warsaw time (UTC +2:00)
2. Run the code from the attached file in browser console
3. Observe results
Actual results:
In years 1900-1915:
Months April-October are shifted by -1 (April becomes March, May becomes April etc.)
In year 1916:
April is shifted by -1
In year 1917:
April is shifted by -1
October is shifted by -1
and so on, and so on.
Expected results:
All month names shall be correct for all dates.
Reporter | ||
Updated•7 years ago
|
Summary: Some historical dates are parsed incorrectly → Intl.DateTimeFormat().format returns wrong month names for some historical dates
Updated•7 years ago
|
Component: Untriaged → JavaScript: Internationalization API
Product: Firefox → Core
Comment 2•7 years ago
|
||
Providing the time in milliseconds since the start of the Unix epoch, i.e. |new Date(-1885683600000 - 24*60*1000).toLocaleString(undefined, {timeZone:"Europe/Warsaw"})|, returns the correct date, which indicates that this is an issue converting the local time to a UTC offset -> bug 1346211.
Component: JavaScript: Internationalization API → JavaScript: Standard Library
Depends on: 1346211
Updated•7 years ago
|
status-firefox57:
--- → affected
Priority: -- → P5
Comment 3•6 years ago
|
||
Dup'ing forward to bug 1346211 which should have fixed this problem. Please reopen if the issue is still present. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•