Use ISO week date numbering for english too#112801
Closed
thecoop wants to merge 1 commit intoelastic:mainfrom
Closed
Use ISO week date numbering for english too#112801thecoop wants to merge 1 commit intoelastic:mainfrom
thecoop wants to merge 1 commit intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Contributor
|
English and Root use different week numbering schemes? Is either of them compliant with ISO week numbering? |
Member
Author
|
They are both first-week-sunday, 1 day minimum week, on compat and cldr. But we override it for compat root, which is where this discrepancy comes in. There are also other changes in other locales between compat and cldr. |
Member
Author
|
We're going to remove the Iso implementation instead |
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.
TL;DR - dates are really, really complicated. Reference - https://en.wikipedia.org/wiki/ISO_week_date
With the changes to defaulting the locale to english rather than root (#112796, #112799), the Iso override added by #48209 no longer applies to english, which results in broken tests as the week numbering changes between the two locales. This PR fixes the immediate problem.
However, this opens up a rather large can of worms - what about all the other locales people use? I don't believe we have any defined behaviour around this, so what is the correct thing to do long-term, and do we want to break week numbering too? Do we just revert to whatever CLDR does, with the corresponding break here too?
This is not a straightforward change - there may be users explicitly using
enlocale with non-iso week dates that will be broken by this PR.