Parsing dd-MMM-yyyy date notation produces negative value
Categories
(Core :: JavaScript: Standard Library, defect, P3)
Tracking
()
| Webcompat Priority | ? |
People
(Reporter: lholman, Unassigned)
Details
Attachments
(1 file)
|
6.01 KB,
image/png
|
Details |
Updated•7 years ago
|
Comment 1•7 years ago
•
|
||
Oh, wow, treating the '-' as a minus sign is ... surprising.
lholman, for what it's worth, there is a standard format for dates, which you can use:
https://tc39.github.io/ecma262/#sec-date-time-string-format
Updated•7 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 5•3 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 3 duplicates.
:sdetar, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 6•3 years ago
|
||
This is now causing a web-compat issue on JAL's flight booking page, as seen in bug 1825938. Maybe it's worth bumping up the priority here?
Updated•3 years ago
|
Comment 7•3 years ago
|
||
possible solution would be to check if the '-' immediately before the possible "year" follows another delimiter,
to distinguish new Date("10-dec-2018") and new Date("10-dec -2018").
Safari parses 10-dec-2018 as 2018-12-10 and 10-dec -2018 as -2018-12-10.
Updated•3 years ago
|
Updated•2 years ago
|
Description
•