public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: newlib@sourceware.org
Cc: Brian.Inglis@SystematicSw.ab.ca
Subject: Re: [PATCH] strftime.c(__strftime): add %q, %v, tests; tweak %Z doc
Date: Mon, 24 Oct 2022 17:50:41 -0600	[thread overview]
Message-ID: <40664e92-d899-fc28-9321-0fb3b97931e8@SystematicSw.ab.ca> (raw)
In-Reply-To: <Y1Z/9BheGNjFiCOp@calimero.vinschen.de>

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.

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

  reply	other threads:[~2022-10-24 23:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-22  5:13 Brian Inglis
2022-10-24 12:07 ` Corinna Vinschen
2022-10-24 23:50   ` Brian Inglis [this message]
2022-10-25 10:38     ` Corinna Vinschen
2022-10-26  3:05       ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40664e92-d899-fc28-9321-0fb3b97931e8@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).