SC22/WG14 N764 J11/97/128 Changes adopted by WG14 Issues about time Clive D.W. Feather clive@demon.net 1997-09-22 Proposals --------- Part A ------ In subclause 7.16.3.5 (strftime()), paragraph 3 (the list of specifiers): * Change the item %f to be %u (wording unaltered). * Change the wording of %V to be: %V is replaced by the ISO 8601 week number (see below) as a decimal number (01-53). * Add the following items: %g is replaced by the last 2 digits of the week-based year (see below) as a decimal number (00-99). %G is replaced by the week-based year (see below) as a decimal number (e.g. 1997). * Add the following text at the end of the list: %g, %G, and %V give values according to the ISO 8601 week-based year. In this system, weeks begin on a Monday and week 1 of the week is the week that includes both January 4th and the first Thursday of the year. If the first Monday of January is the 2nd, 3rd, or 4th, the preceeding days are part of the last week of the preceeding year; thus Saturday 2nd January 1999 will have %G == 1998 and %V == 53. If December 29th, 30th, or 31st is a Monday, it and any following days are part of week 1 of the following year. Thus Tuesday 30th December 1997 will have %G == 1998 and %V == 1. Part B ------ In subclause 7.16.3.5 (strftime()), paragraph 3 (the list of specifiers), change the wording of the following items to avoid confusion (e.g. 2000 is in the 20th century but 2001 is in the 21st): %y is replaced by the last 2 digits of the year as a decimal number (00-99). %Y is replaced by the whole year as a decimal number (e.g. 1997). Part C ------ In subclause 7.16.1, change the range of tm_sec to [0,60]. Change footnote 243 to read "... for a positive leap second". Part E ------ Add the following conversion specifier to subclause 7.16.3.5 (strftime()) paragraph 3: %z is replaced by the offset from UTC in the form "-0430" (meaning 4 hours 30 minutes behind UTC, west of Greenwich). This is the ISO 8601 format. Part F ------ Option [Fc]: Add after paragraph 4 of subclause 7.16.3.5 (strftime()): The characters placed in the array by each conversion specifier depend on one or more members of the structure pointed to by /timeptr/, as specified in brackets in the description. If this value is outside the normal range, the characters stored are unspecified. Add the following to each specifier in paragraph 3: %a [tm_wday] %A [tm_wday] %b [tm_mon] %B [tm_mon] %c [all specified in 7.16.1] %d [tm_mday] %g [tm_year, tm_wday, tm_yday] %G [tm_year, tm_wday, tm_yday] %H [tm_hour] %I [tm_hour] %j [tm_yday] %m [tm_mon] %M [tm_min] %p [tm_hour] %S [tm_sec] %u [tm_wday] %U [tm_year, tm_wday, tm_yday] %V [tm_year, tm_wday, tm_yday] %w [tm_wday] %W [tm_year, tm_wday, tm_yday] %x [all specified in 7.16.1] %X [all specified in 7.16.1] %y [tm_year] %Y [tm_year] %z [tm_isdst] %Z [tm_isdst] Part G ------ Add at the end of subclause 7.16.3.5 (strftime()): In the C locale the replacement strings for the following specifiers are: %a the first three characters of %A %A one of "Sunday", "Monday", ..., "Saturday" %b the first three characters of %B %B one of "January", "February", ..., "December" %c equivalent to "%A %B %d %T %Y" %P one of "am" or "pm" %x equivalent to "%A %B %d %Y" %X equivalent to "%T" %Z implementation-defined