[PATCH] strftime.c(__strftime): add %q, %v, tests; tweak %Z doc

Corinna Vinschen vinschen@redhat.com
Tue Oct 25 10:38:04 GMT 2022


On Oct 24 17:50, Brian Inglis wrote:
> On 2022-10-24 06:07, Corinna Vinschen wrote:
> > On Oct 21 23:13, Brian Inglis wrote:
> > > +	case CQ('v'):	/* BSD/OSX/Ruby extension VMS/Oracle date format
> > > +			   from Arnold Robbins strftime version 3.0 */
> > > +	  { /* %v is equivalent to "%e-%b-%Y", flags and width can change year
> >                                                 ^^^^^
> >                                                 pad?
> > > +	       format. Recurse to avoid need to replicate %b and %Y formation. */
> > 
> > Sorry for being a nag, but doesn't that introduce an incompatible
> > change?  The BSDs don't handle pad and width, they just call
> > _fmt("%e-%b-%Y", ...).  Or am I missing how the BSD function works?
> 
> Yes if this function was actually BSD-like, but newlib strftime supports all
> the POSIX and GNU flags (including +, which was why why I couldn't add BSD
> %+ for default locale formatting), so I thought I should add POSIX extended
> year handling to support the extended year range and formats required, for
> compatibility with other %Y formatting in that function, and tests of that
> functionality.

Sounds ok to me on second thought.  Pushed.


Thanks,
Corinna



More information about the Newlib mailing list