On Sat, 26 Sep 2026 04:50:19 GMT, sbracely <[email protected]> wrote:

> withVariant() used getDayOfYear() as the month-length bound when clamping the 
> day-of-month to the target variant.
> 
> Use getMonthLength(), matching resolvePreviousValid.
> 
> getMonthLength() now calls checkCalendarInit().
> 
> HijrahConfigTest copies a custom variant whose year 1300 month 1 has 29 days 
> and checks that day 30 clamps to 29.
> 
> ---------
> - [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: 6602ddf2
Author:    Liyuan Wang <[email protected]>
Committer: Justin Lu <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/6602ddf2f2d6b9d5693519bc82b00a91c3838976
Stats:     64 lines in 5 files changed: 61 ins; 0 del; 3 mod

8393048: HijrahDate.withVariant fails when the target Hijrah variant has a 
shorter month

Reviewed-by: jlu

-------------

PR: https://git.openjdk.org/jdk/pull/33079

Reply via email to