the javascript-engine returns 943916400000 on Date.parse("0000-00-00") instead of NaN
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| thunderbird_esr115 | --- | unaffected |
| firefox-esr115 | --- | unaffected |
| firefox120 | --- | wontfix |
| firefox121 | --- | fixed |
| firefox122 | --- | fixed |
People
(Reporter: m.sekora.ca, Assigned: vinny.diehl)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0
Steps to reproduce:
run Date.parse("0000-00-00") in the Javascript-Console
Actual results:
943916400000
Expected results:
NaN
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
Thanks for the referral, Tom! TryParseDashedNumericDatePrefix needed to be tightened up a little bit, I have a patch up.
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
| bugherder | ||
Comment 5•2 years ago
|
||
FF120 + 121 affected
| Assignee | ||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
The patch landed in nightly and beta is affected.
:vinny.diehl, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox121towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 7•2 years ago
|
||
Do you think we should uplift this? Asking because of priority set, and because this format YYYY-mm-dd is similar to spec format. Not sure if any websites might rely on this being NaN.
Comment 8•2 years ago
|
||
So, this is a kind of regression from bug 1557650.
I think beta uplift makes sense.
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 9•2 years ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D194858
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Uplift Approval Request
- String changes made/needed: None
- Needs manual QE test: no
- Risk associated with taking this patch: Low
- Fix verified in Nightly: yes
- User impact if declined: Regression affecting date parsing of invalid ISO-like format which is rejected by other browsers
- Explanation of risk level: Small change in well-tested code
- Steps to reproduce for manual QE testing:
Date.parse("0000-00-00")should be NaN - Code covered by automated testing: yes
- Is Android affected?: yes
| Assignee | ||
Updated•2 years ago
|
Comment 11•2 years ago
|
||
Comment on attachment 9366399 [details]
Bug 1866811 - Reject numeric dates with 0 for mon or mday
Approved for 121.0b6.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 12•2 years ago
|
||
| uplift | ||
Description
•