Normative: Determine getWeekInfo().firstDay using First Day Overrides - #1097
Open
ptomato wants to merge 1 commit into
Open
Normative: Determine getWeekInfo().firstDay using First Day Overrides#1097ptomato wants to merge 1 commit into
ptomato wants to merge 1 commit into
Conversation
UTS-35 specifies an algorithm, called "First Day Overrides" (https://unicode.org/reports/tr35/tr35-dates.html#First_Day_Overrides) that determines what subtags in a locale identifier should influence the determination of the first day of the week, and with what priority. Apply the algorithm to Intl.Locale.prototype.getWeekInfo().firstDay. Before this change, the RegionPreference algorithm was applied, which ignored the `-u-ca` calendar value. The RegionPreference algorithm continues to be applied to the determination of the weekend days, which are not affected by the choice of calendar.
Member
Author
|
Tests are in tc39/test262#5128. Note the fallback priorities in that test; if you review this, it'd be good to review the test and see if you agree with the resulting priorities. You might be surprised by the influence of the options bag passed to the constructor. I think this result follows naturally from how the options are treated in the Intl.Locale constructor, but we could write this differently if we wanted a different result. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UTS-35 specifies an algorithm, called "First Day Overrides" (https://unicode.org/reports/tr35/tr35-dates.html#First_Day_Overrides) that determines what subtags in a locale identifier should influence the determination of the first day of the week, and with what priority.
Apply the algorithm to Intl.Locale.prototype.getWeekInfo().firstDay. Before this change, the RegionPreference algorithm was applied, which ignored the
-u-cacalendar value.The RegionPreference algorithm continues to be applied to the determination of the weekend days, which are not affected by the choice of calendar.
Closes: #1055