This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v7 2/2] strftime: Pass the additional flags from "%EY" to "%Ey" [BZ #24096]
17.01.2019 07:39 TAMUKI Shoichi <tamuki@linet.gr.jp> wrote:
> The full representation of the alternative calendar year (%EY)
> typically includes an internal use of %Ey. As a GNU extension, apply
> any flags on %EY (e.g. "%-EY", "%_Ey") to the internal %Ey, allowing
> users of %EY to control how the year is padded.
This is correct according to what Zack wrote.
> ChangeLog:
>
> [BZ #24096]
> * manual/time.texi (strftime): Document "%EC" and "%EY".
OK
> * time/Makefile: Add tst-strftime2 to tests. Also add ja_JP.UTF-8,
> lo_LA.UTF-8, and th_TH.UTF-8 to LOCALES.
This should be:
* time/Makefile (tests): Add tst-strftime2.
(LOCALES): Add ja_JP.UTF-8, lo_LA.UTF-8, and th_TH.UTF-8.
> * time/strftime_l.c (__strftime_internal): Add argument yr_spec to
> override padding for "%Ey".
> If an optional flag ('_' or '-') is specified to "%EY", interpret the
> "%Ey" in the subformat as if decorated with that flag.
> * time/tst-strftime2.c: New file.
The rest of the commit message and the documentation changes are correct,
according to what Zack and Paul wrote before. I need more time to analyze
the "yr_spec" issue. I believe that your code is working, what we are
discussing here is only how (and whether) to do it better.
Regards,
Rafal