commentary change

SCCS-file: strftime.c
SCCS-SID: 7.39
This commit is contained in:
Arthur David Olson
2012-07-18 03:02:21 -04:00
committed by Paul Eggert
parent bf2964b884
commit 47bb36d65f
+32 -31
View File
@@ -174,7 +174,7 @@ label:
** _fmt("%a %b %e %X %Y", t);
** ...whereas now POSIX 1003.2 calls for
** something completely different.
** (ado, 5/24/93)
** (ado, 1993-05-24)
*/
pt = _conv((t->tm_year + TM_YEAR_BASE) / 100,
"%02d", pt, ptlim);
@@ -199,7 +199,7 @@ label:
** %OS %Ou %OU %OV %Ow %OW %Oy
** are supposed to provide alternate
** representations.
** (ado, 5/24/93)
** (ado, 1993-05-24)
*/
goto label;
case 'e':
@@ -225,7 +225,7 @@ label:
** match SunOS 4.1.1 and Arnold Robbins'
** strftime version 3.0. That is, "%k" and
** "%l" have been swapped.
** (ado, 5/24/93)
** (ado, 1993-05-24)
*/
pt = _conv(t->tm_hour, "%2d", pt, ptlim);
continue;
@@ -245,7 +245,7 @@ label:
** match SunOS 4.1.1 and Arnold Robbin's
** strftime version 3.0. That is, "%k" and
** "%l" have been swapped.
** (ado, 5/24/93)
** (ado, 1993-05-24)
*/
pt = _conv((t->tm_hour % 12) ?
(t->tm_hour % 12) : 12,
@@ -290,36 +290,37 @@ label:
** From Arnold Robbins' strftime version 3.0:
** "ISO 8601: Weekday as a decimal number
** [1 (Monday) - 7]"
** (ado, 5/24/93)
** (ado, 1993-05-24)
*/
pt = _conv((t->tm_wday == 0) ? 7 : t->tm_wday,
"%d", pt, ptlim);
continue;
case 'V':
/*
** From Arnold Robbins' strftime version 3.0:
** "the week number of the year (the first
** Monday as the first day of week 1) as a
** decimal number (01-53). The method for
** determining the week number is as specified
** by ISO 8601 (to wit: if the week containing
** January 1 has four or more days in the new
** year, then it is week 1, otherwise it is
** week 53 of the previous year and the next
** week is week 1)."
** (ado, 5/24/93)
*/
/*
** XXX--If January 1 falls on a Friday,
** January 1-3 are part of week 53 of the
** previous year. By analogy, if January
** 1 falls on a Thursday, are December 29-31
** of the PREVIOUS year part of week 1???
** (ado 5/24/93)
*/
/*
** You are understood not to expect this.
*/
/*
** From Arnold Robbins' strftime version 3.0: "the week number of the
** year (the first Monday as the first day of week 1) as a decimal number
** (01-53). The method for determining the week number is as specified by
** ISO 8601 (to wit: if the week containing January 1 has four or more
** days in the new year, then it is week 1, otherwise it is week 53 of the
** previous year and the next week is week 1)."
** (ado, 1993-05-24)
*/
/*
** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn:
** Week 01 of a year is per definition the first week which has the
** Thursday in this year, which is equivalent to the week which contains
** the fourth day of January. In other words, the first week of a new year
** is the week which has the majority of its days in the new year. Week 01
** might also contain days from the previous year and the week before week
** 01 of a year is the last week (52 or 53) of the previous year even if
** it contains days from the new year. A week starts with Monday (day 1)
** and ends with Sunday (day 7). For example, the first week of the year
** 1997 lasts from 1996-12-30 to 1997-01-05...
** (ado, 1993-05-24)
*/
/*
** You are understood not to expect this.
*/
{
int i;
@@ -348,7 +349,7 @@ label:
53 : 52;
#ifdef XPG4_1994_04_09
/*
** As of 4/9/94, though,
** As of 1994-04-09, though,
** XPG4 calls for 53
** unconditionally.
*/
@@ -362,7 +363,7 @@ label:
/*
** From Arnold Robbins' strftime version 3.0:
** "date as dd-bbb-YYYY"
** (ado, 5/24/93)
** (ado, 1993-05-24)
*/
pt = _fmt("%e-%b-%Y", t, pt, ptlim);
continue;