From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] strptime.cc(__strptime): add %q GNU quarter
Date: Mon, 24 Oct 2022 14:09:47 +0200 [thread overview]
Message-ID: <Y1aAi3WLLlDEzJJF@calimero.vinschen.de> (raw)
In-Reply-To: <20221022051603.2787-1-Brian.Inglis@SystematicSW.ab.ca>
On Oct 21 23:16, Brian Inglis wrote:
> ---
> winsup/cygwin/libc/strptime.cc | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc
> index 3a9bdbb300d4..d1e635cd279f 100644
> --- a/winsup/cygwin/libc/strptime.cc
> +++ b/winsup/cygwin/libc/strptime.cc
> @@ -570,6 +570,14 @@ literal:
> LEGAL_ALT(0);
> continue;
>
> + case 'q': /* The quarter year. GNU extension. */
> + LEGAL_ALT(0);
> + i = 1;
> + bp = conv_num(bp, &i, 1, 4, ALT_DIGITS);
> + tm->tm_mon = (i - 1)*3;
> + ymd |= SET_MON;
> + continue;
> +
> case 'S': /* The seconds. */
> LEGAL_ALT(ALT_O);
> bp = conv_num(bp, &tm->tm_sec, 0, 61, ALT_DIGITS);
> @@ -655,7 +663,7 @@ literal:
> got_eoff = 0;
> continue;
>
> - case 'y': /* The year within 100 years of the epoch. */
> + case 'y': /* The year within 100 years of the century or era. */
> /* LEGAL_ALT(ALT_E | ALT_O); */
> ymd |= SET_YEAR;
> if ((alt_format & ALT_E) && *era_info)
Pushed.
Thanks,
Corinna
prev parent reply other threads:[~2022-10-24 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 5:16 Brian Inglis
2022-10-24 12:09 ` Corinna Vinschen [this message]
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=Y1aAi3WLLlDEzJJF@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-patches@cygwin.com \
/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).