Skip to content

Conversation

snowystinger
Copy link
Member

Closes #8810

Running new Intl.Locale('en-US-u-ca-iso8601').getWeekInfo() in supported browsers does return Monday
iso8601 means that the region does not matter https://www.unicode.org/reports/tr35/tr35-72/tr35-dates.html#Week_Data

Technically, the first day is also overridable via fw-tue for example. I've included some parsing for that in browsers that don't support Intl.Locale yet. Is this something we want?

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@rspbot
Copy link

rspbot commented Sep 4, 2025

@rspbot
Copy link

rspbot commented Sep 5, 2025

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

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

Verified the behavior on browsers that support getWeekInfo (Chrome/Safari) and that don't (Firefox). I think its fine to add the -fw- logic for now, hopefully https://bugzilla.mozilla.org/show_bug.cgi?id=1693576 which includes this support in FF gets added soon

@snowystinger
Copy link
Member Author

@yihuiliao @LFDanLu updated and fixed merge, thank you!

@rspbot
Copy link

rspbot commented Sep 8, 2025

@snowystinger snowystinger added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit 89e9e5b Sep 10, 2025
32 checks passed
@snowystinger snowystinger deleted the fix-iso8601-weekstart branch September 10, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The week does not start on Monday if the calendar parameter is set to iso8601 in the locale
4 participants