[v4] Fix strptime era handling, add more era tests [BZ #24394]

TAMUKI Shoichi tamuki@linet.gr.jp
Sat Mar 30 12:54:00 GMT 2019


Hello Rafal-san,

From: Rafal Luzynski <digitalfreak@lingonborough.com>
Subject: Re: [v4] Fix strptime era handling, add more era tests [BZ #24394]
Date: Fri, 29 Mar 2019 12:13:49 +0100 (CET)

> > [...] Regarding *_TW, Rafal-san
> > is preparing a patch.
> 
> That's true.  As always, my free time is limited so if anybody finds
> my work too slow and wants to take the task I'm always open to this.

OK.  I will help you as much as possible. :-)

> > In addition to ja_JP locale, I think it is necessary to check the
> > locale of other countries, in particular *_TW locale.
> 
> This sounds good but also we can add other locales later.
> 
> > What about the consideration of %EY, %_EY, and %-EY?
> 
> As far as I know these flags should be ignored and all potential
> input strings (no matter if they are zero-padded, space-padded
> or no padded at all) should be accepted by any of these format
> specifiers.  At least that was the rule when I was adding a support
> of "%OB"/"%Ob"/"%Oh": all format specifiers should accept all
> potentially possible forms of a month name.
> 
> Of course, we may add tests to verify if these flags are correctly
> ignored and all potential valid inputs are parsed correctly but
> I don't have a strong desire to implement this.

OK.

> > How does it behave if specifying a non-existent date, such as:
> > 
> > Heisei gan nen 01 gatsu 07 nichi
> > Showa   64 nen 01 gatsu 08 nichi
> > 
> > I think that these tests are also necessary.
> 
> I think we can't implement this without your help.

In the social life, the former can hardly occur, but the latter can
happen in reality.

Regards,
TAMUKI Shoichi



More information about the Libc-alpha mailing list