Closed Bug 1863126 Opened 1 year ago Closed 1 year ago

Remove implementation-specific code from ParseISOStyleDate

Categories

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

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: vinny.diehl, Assigned: vinny.diehl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

As discussed here, it would be best to limit the scope of ParseISOStyleDate to spec behavior:
https://tc39.es/ecma262/#sec-date-time-string-format

After D192671 lands, that function will continue to support formats which are not to-spec:

  • YYYY-MM-DD HH:mm:ss.sssZ (space instead of 'T')
  • YYYY-MM-DD H:m:s.sssZ (above, with single-digit hour|minute|second)

With the addition of TryParseDashedNumericDatePrefix in bug 1557650, as well as support for 'Z' timezone specifier in bug 1852422, we are getting close to being able to refactor this function to only support spec behavior.

I started working on this but ran up against bug 1863125, we'll need to look at that first. I'll upload a WIP patch for now.

The implementation-specific parsing for these types of dates is now
covered by TryParseDashedNumericDatePrefix, so we can do away with
this isStrict/isPermissive business now.

Assignee: nobody → vinny.diehl
Attachment #9361986 - Attachment description: WIP: Bug 1863126 - Refactor ParseISOStyleDate to remove implementation-specific code r?arai → Bug 1863126 - Refactor ParseISOStyleDate to remove implementation-specific code r?arai
Status: NEW → ASSIGNED
Priority: -- → P3
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/de7ca4a4e862 Refactor ParseISOStyleDate to remove implementation-specific code r=arai
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: