suggested improvements for C9x `New formats for strftime()' (N733)
Paul Eggert
eggert at twinsun.com
Wed Jul 9 02:39:29 UTC 1997
Date: Mon, 07 Jul 1997 11:12:06 +0200
From: Antoine Leca <Antoine.Leca at renault.fr>
There is a difference between %V, showing
the week number _in_the_year_ based on Monday, the first Thrusday
being in week 01 (and thus able to be 00), and the real ISO 8601
week number, %#W (restricted in range to 01-53).
There is certainly a difference in the two concepts that you describe,
but %V is supposed to be the ISO 8601 week number.
The ISO 8601 week number can never be zero, so it must be a typo when
ISO/IEC JTC1/SC22/WG14 N733 says that %V can be 00.
As far as I can tell, the correspondence is as follows:
common
N733 N735 POSIX.2 usage meaning
%f %#w %u %u ISO 8601 weekday number
%V %#W %V %V ISO 8601 week number
%#Y %G ISO 8601 week number year
%#y %g ISO 8601 week number year modulo 100
%#Z %z timezone using RFC-822 numeric notation
I don't know why the C9X draft diverges so far from common usage (not
to mention POSIX.2), but at least N735 provides the needed functionality.
So we probably need two specifiers, instead of one in current art.
I don't see the need for a week number that is like ISO 8601's but is
sometimes zero.
More information about the tz
mailing list