Re: [PATCH] nstrftime: better width support for %N, %z

2020-05-21 Thread Paul Eggert
On 5/21/20 6:40 AM, Bruno Haible wrote: I don't think the coreutils 'date' documentation is or should be the reference manual for nstrftime(). Hmm, well, to some extent I might prefer just one copy of the documentation for those formats, either in the 'date' manual or in an 'nstrftime' manual

Re: [PATCH] nstrftime: better width support for %N, %z

2020-05-21 Thread Bruno Haible
Hi Paul, > > If the change is intended, the documentation of `date` should be updated > > Thanks for mentioning this. The change was intended, and I installed the > attached patch into the Coreutils documentation. Where is %N of nstrftime documented? I don't see it documented in POSIX [1], in t

Re: [PATCH] nstrftime: better width support for %N, %z

2020-05-21 Thread Kamil Dudka
On Thursday, May 21, 2020 2:35:12 AM CEST Paul Eggert wrote: > On 5/20/20 10:51 AM, Kamil Dudka wrote: > > If the change is intended, the documentation of `date` should be updated > > Thanks for mentioning this. The change was intended, and I installed the > attached patch into the Coreutils docum

Re: [PATCH] nstrftime: better width support for %N, %z

2020-05-20 Thread Paul Eggert
On 5/20/20 10:51 AM, Kamil Dudka wrote: If the change is intended, the documentation of `date` should be updated Thanks for mentioning this. The change was intended, and I installed the attached patch into the Coreutils documentation. >From 6d0107a37f3b648aa43bf790625dd25f9f8301e7 Mon Sep 17 0

Re: [PATCH] nstrftime: better width support for %N, %z

2020-05-20 Thread Kamil Dudka
On Friday, December 6, 2019 11:51:31 PM CEST Paul Eggert wrote: > * lib/nstrftime.c (width_add, width_add1, width_cpy): > New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding > a new WIDTH parameter. > (add, add1, cpy): Use these macros. > (width_add): Do not treat digits == 0 as a special c

[PATCH] nstrftime: better width support for %N, %z

2019-12-06 Thread Paul Eggert
* lib/nstrftime.c (width_add, width_add1, width_cpy): New macros, which generalize ‘add’, ‘add1’, ‘cpy’ by adding a new WIDTH parameter. (add, add1, cpy): Use these macros. (width_add): Do not treat digits == 0 as a special case, do not pad if padding is ‘-’, and do not use a negative width. (__str