-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Use ISO standard for week of week based year #42588
Comments
Pinging @elastic/es-core-infra |
This behaviour is described in jdk javadoc
It mentioned that this is localized. The code that is responisble for this is here:
|
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday. closes elastic#42588 an issue with investigation details relates elastic#41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented closes elastic#43275 an issue raised by community member
Introducing a IsoLocal.ROOT constant which should be used instead of java.util.Locale.ROOT in ES when dealing with dates. IsoLocal.ROOT customises start of the week to be Monday instead of Sunday. closes elastic#42588 an issue with investigation details relates elastic#41670 bug raised (this won't fix it on its own. joda.parseInto has to be reimplemented closes elastic#43275 an issue raised by community member change skip reason compile error not orking spi working unit test cleanup change providers for 9+ revert changes IsoLocale cleanup move spi files to server make unit test pass from gradle expermienting with gradle tasks uncomment jar hell check only add settings in buildplugin allign options for locale providers
raising this for the record. Will update known issues week based dates like
results in
should not, and since 7.6 it returns fine.
correct
|
In java.time week of weekbased year is depending on Locale. The locale we use is ROOT, and it does not define the start of the week.
Therefore start of the week can be either Sunday or Monday.
ISO 8601 defines start of the week as Monday, and that standard was used in Joda for week of week based year.
This would fail because of that change.
2019-21 (ok joda) vs 2019-22 (java)
The text was updated successfully, but these errors were encountered: