<i18n dev> RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]
Stephen Colebourne
scolebourne at openjdk.org
Mon Sep 16 19:39:09 UTC 2024
On Mon, 16 Sep 2024 19:30:56 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java line 308:
>>
>>> 306: if (off < tokens.length) {
>>> 307: String dayRule = tokens[off++];
>>> 308: if (dayRule.regionMatches(true, 0, "last", 0, 4)) {
>>
>> This isn't correct, as per the mailing list:
>>
>>> > can "last" contain uppercase letters, or
>>> > does it have to be exactly "last"?
>>>
>>> In that case the name is "lastSunday", and it can be abbreviated
>>> "lastSu" or "Lastsu" or "LASTSUNDA" or whatever.
>
> Why is it not? IIUC, abbreviation should be unambiguous, so "last" part is always case-insensitive 4 character length.
Sorry, I assumed this regionMatches was the same as the others. "last" is always "last" and never abbreviated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20940#discussion_r1761774912
More information about the i18n-dev
mailing list