Article View: comp.std.internat
Article #2Re: Posix 1003.2 and week numbers
From: Hal Jespersen
Date: Sat, 31 Oct 1992 19:51
Date: Sat, 31 Oct 1992 19:51
43 lines
1991 bytes
1991 bytes
Dan.Oscarsson@malmo.trab.se (Dan Oscarsson) writes:
: Looking at POSIX 1003.2 drafts I saw that the date command
: has a output format for week numbers:
: %U range (00-53)
: %W range (00-53)
:
: I do not know what POSIX 1003.1 says about strftime for the same
: format codes, but I really hope this is not what the standard contains.
:
: I doubt there are very many countries that start numbering their weeks
: with 00. Most would start with 01.
: And if it started with 00 it should end with 52.
:
: Does anybody know how it is?
: If it starts with zero I would expect week number to be worthless
: in many countries.
:
: Dan
You are looking at an old draft. IEEE Std 1003.2-1992 has the following:
%U Week of the year (Sunday as the first day of the week) as a
decimal number (00-53). All days in a new year preceding the
first Sunday shall be considered to be in week 0.
%V Week of the year (Monday as the first day of the week) as a
decimal number (01-53). The method for determining the week
number shall be as specified by ISO 8601 {4}.
%W Week of the year (Monday as the first day of the week) as a
decimal number (00-53). All days in a new year preceding the
first Monday shall be considered to be in week 0.
I believe other responses described the ISO 8601 algorithm. And, 1003.1
has not modified strftime() [yet?].
Hal Jespersen
POSIX Software Group
447 Lakeview Way
Redwood City, CA 94062
+1 (415) 364-3410
+1 (415) 364-4498 FAX
hlj@posix.com
Technical Details
Message-ID:
<196@posix.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!netcomsv!posix!hljReferences:
<1992Oct19.101134.13954@malmo.trab.se>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!netcomsv!posix!hlj From: hlj@posix.COM (Hal Jespersen) Newsgroups: comp.std.internat Subject: Re: Posix 1003.2 and week numbers Message-ID: <196@posix.COM> Date: 31 Oct 92 19:51:46 GMT References: <1992Oct19.101134.13954@malmo.trab.se> Distribution: comp Organization: POSIX Software Group, Redwood City, CA Lines: 43