[RFC][PATCH] Multiple locales: Use the correct date and time formats (bug 10496, 23724).
Rafal Luzynski
digitalfreak@lingonborough.com
Sat Nov 3 19:46:00 GMT 2018
Hello Tamuki Shoichi and thank you for your feedback.
3.11.2018 05:06 TAMUKI Shoichi <tamuki@linet.gr.jp> wrote:
>
>
> Hello Rafal,
>
> From: Rafal Luzynski <digitalfreak@lingonborough.com>
> Subject: [RFC][PATCH] Multiple locales: Use the correct date and time
> formats (bug 10496, 23724).
> Date: Fri, 2 Nov 2018 12:11:09 +0100 (CET)
>
> > [...]
> > @@ -303,16 +303,19 @@ mon "janar";/
> > am_pm "PD";"MD"
> > %
> > % Appropriate date and time representation
> > -d_t_fmt "%Y-%b-%d %I.%M.%S.%p %Z"
> > +d_t_fmt "%a %-d %b %Y %l:%M:%S.%p"
>
> I am afraid that change will unable to keep it a constant width.
Is it required to keep the constant width? In my native locale we use
"%-d" and I think it works fine.
> How about using "%a %_d %b %Y %l:%M:%S.%p" instead.
"_" means "use a space as padding". If I had to use space padding
I would use "%e" instead which does the same and is less tricky.
> [...]
> > %
> > % Appropriate date representation
> > -d_fmt "%Y-%b-%d"
> > +d_fmt "%-d.%-m.%y"
>
> Likewise, how about using "%_d.%_m.%y" instead.
No, additional space before a month number looks definitely bad.
We use dots or other punctuation characters and zero padding to avoid
spaces in a string which normally should have no spaces.
Thank you again and best regards,
Rafal
More information about the Libc-alpha
mailing list