Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FF122 Date parser parses first three chars of month #31931

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

hamishwillee
Copy link
Collaborator

For parity with Chrome/Safari the data parsers now only looks at the first three characters of the month when parsing non-standard date strings. Previously it would parse only valid truncated values of the month name - e.g. for december it might accept Dec, Dece, Decemb, December. Now it will accept DecFooo like the other browsers.

This adds a release note and an example in the Date.parse() function.

Related docs work can be tracked in #31930

@hamishwillee hamishwillee requested review from a team as code owners January 26, 2024 06:07
@hamishwillee hamishwillee requested review from Josh-Cena and bsmth and removed request for a team January 26, 2024 06:07
@github-actions github-actions bot added Content:JS JavaScript docs Content:Firefox Content in the Mozilla/Firefox subtree size/m [PR only] 51-500 LoC changed labels Jan 26, 2024
Copy link
Contributor

github-actions bot commented Jan 26, 2024

Preview URLs

External URLs (1)

URL: /en-US/docs/Mozilla/Firefox/Releases/122
Title: Firefox 122 for developers

(comment last updated: 2024-02-09 00:05:19)

@@ -94,6 +94,14 @@ Date.parse("2014-02-30");
// NaN in Safari and Firefox;
// 1393718400000 in Chrome (Sun Mar 02 2014 00:00:00 GMT+0000)
Date.parse("02/30/2014"); // 1393718400000 in all implementations

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope of this PR, but I think this section is getting a little disorganized. Maybe in future we can separate this code block into categories or subsections.

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Hamish! Some comments for consideration, but leaving a +1 👍🏻

Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Jan 26, 2024
@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed merge conflicts 🚧 [PR only] size/m [PR only] 51-500 LoC changed labels Feb 7, 2024
Co-authored-by: Brian Thomas Smith <[email protected]>
@hamishwillee
Copy link
Collaborator Author

Thanks for the review @bsmth - much appreciated.

@hamishwillee hamishwillee merged commit 2f8d504 into mdn:main Feb 9, 2024
8 checks passed
@hamishwillee hamishwillee deleted the ff122_date_parse branch February 9, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Firefox Content in the Mozilla/Firefox subtree Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants