From 43052a1074d61d682a42df556712fda91b439dba Mon Sep 17 00:00:00 2001 From: Jack Conradson Date: Thu, 27 Jan 2022 12:23:49 -0800 Subject: [PATCH] Fix joda migration for week based methods in Painless (#83232) This change updates the docs to correct suggestions for migrating from JodaCompatibleZonedDateTime to ZonedDateTime in Painless for week based year and week of week based year. --- docs/reference/migration/migrate_8_0/painless-changes.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/migration/migrate_8_0/painless-changes.asciidoc b/docs/reference/migration/migrate_8_0/painless-changes.asciidoc index f526002a486d8..96a6f819e10ed 100644 --- a/docs/reference/migration/migrate_8_0/painless-changes.asciidoc +++ b/docs/reference/migration/migrate_8_0/painless-changes.asciidoc @@ -37,7 +37,8 @@ The following `JodaCompatibleZonedDateTime` methods must be replaced using * `getMonthOfYear()` -> `getMonthValue()` * `getSecondOfDay()` -> `get(ChronoField.SECOND_OF_DAY)` * `getSecondOfMinute()` -> `getSecond()` -* `getWeekOfWeekyear()` -> `get(DateFormatters.WEEK_FIELDS_ROOT.weekBasedYear())` +* `getWeekOfWeekyear()` -> `get(IsoFields.WEEK_OF_WEEK_BASED_YEAR)` +* `getWeekyear()` -> `get(IsoFields.WEEK_BASED_YEAR)` * `getYearOfCentury()` -> `get(ChronoField.YEAR_OF_ERA) % 100` * `getYearOfEra()` -> `get(ChronoField.YEAR_OF_ERA)` * `toString(String)` -> a DateTimeFormatter