public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: Jon Turney <jon.turney@dronecode.org.uk>,
	Cygwin Patches <cygwin-patches@cygwin.com>
Subject: Re: [PATCH 0/3] strftime, strptime: add %i, %q, %v, tests; tweak %Z docs
Date: Thu, 15 Sep 2022 13:52:56 -0600	[thread overview]
Message-ID: <e36cf30f-8d5d-b1b8-6e31-79c8ee9fc096@SystematicSw.ab.ca> (raw)
In-Reply-To: <90d51419-b247-848d-6754-8ffd24792d31@dronecode.org.uk>

On 2022-09-15 11:45, Jon Turney wrote:
> On 14/09/2022 03:52, Brian Inglis wrote:
>> [Please Reply All due to email issues]
>>
>> newlib/libc/time/strftime.c(strftime): add %i, %q, %v, tests; tweak %Z 
>> docs
>> newlib/libc/time/strptime.c(strptime_l): add %i, %q, %v
>> winsup/cygwin/libc/strptime.cc(__strptime): add %i, %q, %v
>>
>> %i year in century [00..99] Synonym for "%y". Non-POSIX extension. 
>> [tm_year]
>> %q GNU quarter of the year (from `<<1>>' to `<<4>>') [tm_mon]
>> %v OSX/Ruby VMS/Oracle date "%d-%b-%Y". Non-POSIX extension. [tm_mday, 
>> tm_mon, tm_year]
>> add %i %q %v tests
>> %Z clarify current time zone *abbreviation* not "name" [tm_isdst]
> 
> The newlib patches should go to the newlib list.

Right - okay - should have remembered - will split and add xrefs.

> Do you have a reference for an OS supporting the %i extension?  I'm just 
> curious if it specifies the same pivot year for strptime() as POSIX does 
> for %y?

It was documented as a synonym for %y, so %i uses the code for %y.
Sources supporting POSIX pivot at <= 68 => 2000, >= 69 => 1900.

Sorry, I couldn't find the sources for "%i year" when I went looking 
back thru my str[fp]time sources searches for comments - too many repos 
visited, no case sensitive search engines or page find strings, and 
everything supports %I US 12 hour clock and various year formats!
It may have been a newer language library implementation.
I don't keep copies of sources or links to avoid possibilities of 
plagiarism or influence, making it easier to follow existing approaches 
in the source files being changed.

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

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

[For Y2K, two digit year formats were deprecated and upgraded, so I'm 
extremely disappointed, nay disgusted, that they still haven't been 
dropped, as they will continue to be ambiguous until 2031, as I flip 
between English language sites in various countries!
I'm in favour of promoting -Werror=format-y2k, similar to the common 
-Werror=format-security build option!
But given that few care to remember the issues, costs, solutions, and 
recommendations, I'll support adding the convenience format.]

      reply	other threads:[~2022-09-15 19:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14  2:52 Brian Inglis
2022-09-14  2:52 ` [PATCH 1/3] strftime.c(__strftime): " Brian Inglis
2022-09-14  2:52 ` [PATCH 2/3] strptime.c(strptime_l): add %i, %q, %v Brian Inglis
2022-09-14  2:52 ` [PATCH 3/3] strptime.cc(__strptime): " Brian Inglis
2022-09-15 17:45 ` [PATCH 0/3] strftime, strptime: add %i, %q, %v, tests; tweak %Z docs Jon Turney
2022-09-15 19:52   ` Brian Inglis [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=e36cf30f-8d5d-b1b8-6e31-79c8ee9fc096@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin-patches@cygwin.com \
    --cc=jon.turney@dronecode.org.uk \
    /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).