Re: Translation issues with strftime



On Tue, 2003-12-02 at 20:48, Abel Cheung wrote:
> On 2003-12-01(Mon) 09:22:43 +0100, Vincent Untz wrote:
[...]
> > It seems that this is not working everywhere. Looking at the strftime
> > manual, I could not find any mention of such '%-' thing. It might be a
> > GNU extension.

> Seems you're correct.
> 
> [deaddog@localhost ~]$ man date
> [.........]
> 
>        By  default, date pads numeric fields with zeroes.  GNU date recognizes
>        the following modifiers between `%' and a numeric directive.
> 
>               `-' (hyphen) do not pad the field `_' (underscore) pad the field
>               with spaces

It is completely undocumented behaviour for strftime(), though. It
happens to work, but the strftime(3) page mentions nothing about the
modifier.

If it is really important that those strings don't have a leading zero
for locale-specific reasons, shouldn't the original string be %X and %x,
as appropriate, rather than some tricked out version as is there
currently?

Malcolm





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]