<i18n dev> RFR: 8349000: Performance improvement for Currency.isPastCutoverDate(String) [v2]

Justin Lu jlu at openjdk.org
Fri Jan 31 19:46:38 UTC 2025


On Fri, 31 Jan 2025 18:43:58 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   generalize format comment
>
> src/java.base/share/classes/java/util/Currency.java line 1179:
> 
>> 1177:         }
>> 1178: 
>> 1179:         // cutOver adheres to: "yyyy-MM-ddTHH:mm:ss"
> 
> In java.time, `YEAR` is represented as `u`, so "uuuu" is more accurate.

> Looks good. Since this code does not run in normal situations (only works when users provide a custom currency properties file), further (not concise) performance refactor may not be significant.

Agreed, this change is easy and more readable IMO, so I figured might as well, but won't do anything past this.

> In java.time, YEAR is represented as u, so "uuuu" is more accurate.

I used "`yyyy-MM-ddTHH:mm:ss`" because this is the literal date/time format specified by `Currency`. (It still uses DateFormat patterns).

_The format of the timestamp must be of ISO 8601 format : 'yyyy-MM-dd'T'HH:mm:ss'_

But I understand the confusion. Changed the comment to use a generalized ISO 8601 format wording.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23374#discussion_r1937864232


More information about the i18n-dev mailing list