Closed
Bug 1872333
Opened 2 years ago
Closed 2 years ago
Day of month overflow should be parsed as an ISO style date
Categories
(Core :: JavaScript: Standard Library, defect)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
123 Branch
| Tracking | Status | |
|---|---|---|
| firefox123 | --- | fixed |
People
(Reporter: vinny.diehl, Assigned: vinny.diehl)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, parity-chrome)
Attachments
(1 file)
When day of month overflows the number of days in that actual month, we simply skip to the next month. For example, Feb 31 on a non-leap year becomes Mar 3. An overflowed date like this doesn't violate the Date Time String Format, which simply calls for a number 01-31 for DD, however, we don't parse these overflows as a spec date, which Chrome does:
| Input | JavaScriptCore | SpiderMonkey | V8 |
|---|---|---|---|
"2009-02-31" |
Invalid Date | Tue Mar 03 2009 00:00:00 GMT-0700 (Mountain Standard Time) | Mon Mar 02 2009 17:00:00 GMT-0700 (Mountain Standard Time) |
"2009-02-31T00:00" |
Invalid Date | Invalid Date | Tue Mar 03 2009 00:00:00 GMT-0700 (Mountain Standard Time) |
The spec doesn't say what to do when DD overflows, so I don't believe we are in violation, however this discrepancy is preventing us from being able to use ParseISOStyleDate to accurately detect whether a string follows the spec format over in bug 1872116.
| Assignee | ||
Comment 1•2 years ago
|
||
Depends on D197046
Updated•2 years ago
|
Assignee: nobody → vinny.diehl
Status: NEW → ASSIGNED
Blocks: 1872116
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/a0496a30342e
Parse mday overflow as ISO style date r=arai
Comment 3•2 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox123:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
| Assignee | ||
Updated•2 years ago
|
Keywords: dev-doc-needed
Comment 4•2 years ago
|
||
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•