Index | Thread | Search

From:
Evan Silberman <evan@jklol.net>
Subject:
Re: strftime.3: clarify %G and %g description
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
tech@openbsd.org, Todd Miller <millert@openbsd.org>, Ingo Schwarze <schwarze@openbsd.org>, Lucas Gabriel Vuotto <lucas@sexy.is>
Date:
Tue, 23 Apr 2024 14:14:55 -0700

Download raw body.

Thread
Christian Weisgerber <naddy@mips.inka.de> wrote:
> Lucas Gabriel Vuotto just pointed out that got(1) was mistakenly
> using %G to get the year with strftime().  This is a trap set by a
> poor description in our strftime.3.  I suggest the clarification
> below, taken from FreeBSD.
> 
> OK?  Or would somebody like to suggest a better phrasing?

Looking at the wikipedia article about this phenomenon I’d suggest you
just replace "ISO 8601 year" with "ISO week-numbering year". Presumably everyone
whose job it is to know what the ISO week-numbering system is will know
what it means. I'd suggest that ISO 8601 more broadly is familiar to
people as being the standard defining the "%Y-%m-%dT%H:%M:%S%z" format.

Note that the details of the ISO week-numbering year are explained with
different wording under the documentation of %V.

Evan S.