On Sat, 7 Sept 2024 at 16:15, Paul Eggert via tz <tz@iana.org> wrote:
On 2024-09-07 02:20, Stephen Colebourne via tz wrote:
the zic doc mentions accepting "lastsa" instead of "lastSat". Are there checks in place to ensure that TZDB only produces the normalized form of codes like these?
No, and there must be dozens of other normalization issues that are not checked. I haven't bothered putting in checks like that unless problems arise, partly due to lack of time and partly so that I don't have to worry about what the "normal form" should be.
As it happens, "lastSa" does appear in one of the TZDB tarballs, in tzdata.zi (attached). Any parser that can't handle "lastSa" really should be fixed.
I assume the "last" part of "lastSunday" does not count as a "name" (as in the paragraph of zic(8) that begins "Names must be in English and are case insensitive") , because that would imply lastSunday could be abbreviated to lSu. But can "last" contain uppercase letters, or does it have to be exactly "last"? My assumption from zic(8) is exactly "last". I just realised today that my parser handles abbreviations properly but isn't always case insensitive. I'd like to make sure I'm handling "last" correctly at the same time as fixing the case handling.