Article View: comp.std.internat
Article #717Re: Definition of week
From: Markus Kuhn
Date: Sun, 05 Nov 1995 09:08
Date: Sun, 05 Nov 1995 09:08
37 lines
2266 bytes
2266 bytes
msb@sq.com (Mark Brader) writes: >However, the "ANSI C" standard, written in the US but adopted inter- >nationally as ISO 9899, is. The library function strftime() supports >two kinds of week numbers (presumably intended for the "few people" >I mentioned above), but neither numbering is ISO 8601 style. I think this really has to be extended in the next ISO 9899 (ISO C) revision! POSIX.2 has already added a few formatting codes for the "date" program command, including %V for the ISO 8601 week number (01-53) and %u for the day of the week (Monday = 1, Sunday = 7). From a text which I wrote recently: "Unfortunately, the current version of the C programming language standard provides in the strftime() function no means to generate the ISO 8601 week notation. A required extension would be four new formatting codes: for the year of the week to which the specified day belongs (both 2-digit and 4-digit), for the number of the week between 01 and 53 (%V), and for the day of the week between 1 (Monday) and 7 (Sunday) (%u). Another trivial mistake in the description of strftime() in the C standard is that the range of seconds goes from 00 to 61, because at one time only one single leap second 60 can be inserted into UTC and consequently there will never be a leap second 61." (Full text is on <http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html>) Is such an extension of ISO C alread planned or shall I send a request about this tiny problem to DIN myself? Markus -- Markus Kuhn, Computer Science student -- University of Erlangen, Internet Mail: <mskuhn@cip.informatik.uni-erlangen.de> - Germany WWW Home: <http://wwwcip.informatik.uni-erlangen.de/user/mskuhn>
Technical Details
Message-ID:
<47huv8$3hh@cortex.dialin.rrze.uni-erlangen.de>Path:
arc1-ca.pugleaf.net!unrza3.dialin.rrze.uni-erlangen.de!not-for-mailReferences:
<474o0m$kjq@caesar.udac.se> <475fs3$qfp@dg-rtp.dg.com> <1995Nov4.043148.18821@sq.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!unrza3.dialin.rrze.uni-erlangen.de!not-for-mail From: mskuhn@unrza3.dialin.rrze.uni-erlangen.de (Markus Kuhn) Newsgroups: comp.std.internat,comp.std.c Subject: Re: Definition of week Date: 5 Nov 1995 10:08:56 +0100 Organization: Markus Kuhn, 91080 Uttenreuth, Germany Message-ID: <47huv8$3hh@cortex.dialin.rrze.uni-erlangen.de> References: <474o0m$kjq@caesar.udac.se> <475fs3$qfp@dg-rtp.dg.com> <1995Nov4.043148.18821@sq.com> Reply-To: mskuhn@cip.informatik.uni-erlangen.de NNTP-Posting-Host: unrza3.dialin.rrze.uni-erlangen.de