aboutsummaryrefslogtreecommitdiffstats
path: root/man3/strftime.3
diff options
context:
space:
mode:
authorUrs Thuermann <urs@isnogud.escape.de>2020-04-14 09:02:07 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-04-14 09:02:07 +0200
commit6193e7abb857c2ece27e8d95b378a982a20fbc2c (patch)
treeb7ce5566ba5d3a23414242a82eb568c2bd613f71 /man3/strftime.3
parentd7695b17b108cc152df49b814eecf38c3b5127f1 (diff)
downloadman-pages-6193e7abb857c2ece27e8d95b378a982a20fbc2c.tar.gz
strftime.3: ISO week number can be 52, add example
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 Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/strftime.3')
-rw-r--r--man3/strftime.36
1 files changed, 4 insertions, 2 deletions
diff --git a/man3/strftime.3 b/man3/strftime.3
index 937473b6a1..8c38682e33 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -575,8 +575,8 @@ 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
@@ -585,6 +585,8 @@ week 53
of the year 2009
.RB ( %G );
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