Re: [patch] strftime.3: ISO week number can be 52, add example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Urs,

On Mon, 2 Nov 2009 at 16:05, Urs Thuermann <urs@xxxxxxxxxxxxxxxxx> wrote:
>
> A year cannot only begin with week number 53 of the previous year but
> also with week number 52.  Year 2011 is an example for this case, as
> can be easily seen with GNU date:
>
> $ date -d "jan 1 2011" "+%c %V %G"
> Sat Jan  1 00:00:00 2011 52 2010
>
> This patch is against the current man-pages git repository.

Patch applied!

Cheers,

Michael


> diff --git a/man3/strftime.3 b/man3/strftime.3
> index 8dfe58c..a516979 100644
> --- a/man3/strftime.3
> +++ b/man3/strftime.3
> @@ -360,13 +360,15 @@ the first week of the year that contains a Thursday;
>  or, the week that has 4 January in it).
>  When three of fewer days of the first calendar week of the new year fall
>  within that year,
> -then the ISO 8601 week-based system counts those days as part of week 53
> -of the preceding year.
> +then the ISO 8601 week-based system counts those days as part of week 52
> +or 53 of the preceding year.
>  For example, 1 January 2010 is a Friday,
>  meaning that just three days of that calendar week fall in 2010.
>  Thus, the ISO\ 8601 week-based system considers these days to be part of
>  week 53 (\fB%V\fP) of the year 2009 (\fB%G\fP) ;
>  week 01 of ISO\ 8601 year 2010 starts on Monday, 4 January 2010.
> +Similarly, the first two days of January 2011 are considered to be part
> +of week 52 of the year 2010.
>  .SS Glibc Notes
>  Glibc provides some extensions for conversion specifications.
>  (These extensions are not specified in POSIX.1-2001, but a few other



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux