On Fri, 18 Sep 2026 22:45:55 GMT, Justin Lu <[email protected]> wrote:
> This PR corrects the output of > `HijrahChronology.INSTANCE.range(ChronoField.DAY_OF_YEAR).getSmallestMaximum()` > to reflect the true smallest maximum, 354. It currently returns 355. > > There are two separate concerns, > > In `loadCalendarData()`, the `minYearLength` uses its default value of 0 in > its `min` calculations, which ends up causing a `minYearLength` of 0. On top > of this, the `ValueRange` for `DAY_OF_YEAR` should use the 3-arg overload, > which allows passing `minYearLength`, so that the range can produce the > correct smallest max. > > Additionally, the `year < maxYear` conditional should be inclusive. Note that > fixing this boundary check does not actually have any observable behavioral > differences because the built-in Umm al-Qura calendar data consists of only > 354 and 355 days, which the many previous years already establish. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). This pull request has now been integrated. Changeset: 28b5b385 Author: Justin Lu <[email protected]> URL: https://git.openjdk.org/jdk/commit/28b5b3856458419e08024b5002e84e7cfe66411d Stats: 15 lines in 2 files changed: 9 ins; 0 del; 6 mod 8392606: HijrahChronology computes minYearLength as 0 and skips the last configured year Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/32958
