Closed Bug 1894248 Opened 9 months ago Closed 9 months ago

Date parsing inconsistencies with dd-MMM-00yy

Categories

(Core :: JavaScript: Standard Library, defect, P3)

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: Ms2ger, Assigned: vinny.diehl)

References

(Blocks 1 open bug)

Details

(Keywords: parity-chrome)

Attachments

(1 file)

Checking the output for

new Date("23-Apr-0024")
new Date("23Apr0024")

firefox 125

  • Tue Apr 23 0024 00:00:00 GMT+0017 (Central European Standard Time)
  • Tue Apr 23 0024 00:00:00 GMT+0017 (Central European Standard Time)

chrome 125

  • Tue Apr 23 2024 00:00:00 GMT+0200 (Central European Summer Time)
  • Tue Apr 23 2024 00:00:00 GMT+0200 (Central European Summer Time)

some old version of WebKit:

  • Tue Apr 23 2024 00:00:00 GMT+0200 (Central European Summer Time)
  • Invalid Date

Vinny: In case you'd like to take a peek here, giving you right of first refusal :)

Severity: -- → S3
Flags: needinfo?(vinny.diehl)
Priority: -- → P3
Assignee: nobody → vinny.diehl
Status: NEW → ASSIGNED

Yup. We were fixing up the year based on number of digits rather than whether it actually needed fixing up (i.e. year < 100). Patch is up :)

Flags: needinfo?(vinny.diehl)

Parsing an explicit 0024 as 2024 is crazy, but I guess thanks to Chrome for introducing such a lenient parsing.

:evilpie yeah, for the record I hate this (ISO even parses differently than non-ISO!) , but I guess we're doing it. Yay parity!

Keywords: parity-chrome
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: