-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: iso8601 week start and use intl.locale when possible for week start #8815
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
Conversation
|
Build successful! 🎉 |
|
Build successful! 🎉 |
LFDanLu
left a comment
There was a problem hiding this 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
|
@yihuiliao @LFDanLu updated and fixed merge, thank you! |
|
Build successful! 🎉 |
Closes #8810
Running
new Intl.Locale('en-US-u-ca-iso8601').getWeekInfo()in supported browsers does return Mondayiso8601 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-tuefor 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:
📝 Test Instructions:
🧢 Your Project: