On Fri, 17 Jul 2026 17:22:00 GMT, Justin Lu <[email protected]> wrote:

>> Thanks for your update, it looks good to me. I'll run your change on our CI.
>> 
>>> Did we want unit tests specifically for the new toProlepticYear method? 
>> 
>> I don't think we need white-box tests for the helper method, the existing 
>> public API tests are sufficient.
>> 
>>> I also just wanted to confirm if toProlepticYear is the correct 
>>> nomenclature.
>> 
>> I think this name is correct. We are taking the Gregorian era and year and 
>> convert it to the ISO proleptic year. That is how the converted java.time 
>> classes refer to the year.
>> 
>> https://docs.oracle.com/en/java/javase/26/docs//api/java.base/java/time/LocalDate.html#getYear()
>> https://docs.oracle.com/en/java/javase/26/docs//api/java.base/java/time/LocalDateTime.html#getYear()
>
>> I think this name is correct. We are taking the Gregorian era and year and 
>> convert it to the ISO proleptic year. That is how the converted java.time 
>> classes refer to the year.
> 
> Okay, scratch that. 
> 
> We are just deriving the java.time value from the date's values for year, 
> month, etc. Technically, the conversion to the ISO calendar system is not 
> exact, since `GregorianCalendar` is a hybrid Julian-Gregorian calendar. 
> 
> We might better name it as `toGregorianProlepticYear`, which only indicates 
> that the year and era are used to derive a Gregorian proleptic year (and not 
> an exact ISO date conversion).

Ok I've renamed that as suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31808#discussion_r3605099382

Reply via email to