]> git.eshelyaron.com Git - emacs.git/commitdiff
; Improve documentation of 'format-time-string'
authorEli Zaretskii <eliz@gnu.org>
Tue, 29 Apr 2025 08:19:19 +0000 (11:19 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 1 May 2025 05:32:05 +0000 (07:32 +0200)
* doc/lispref/os.texi (Time Parsing): Fix documentation of week
numbers for %U, %V and %W.  (Bug#78096)

(cherry picked from commit 79e7eeb32964ba79f0d0ef06c9c0d7c16c542f37)

doc/lispref/os.texi

index c5a1b84a803f962debd80e7fa3385e0b458f147f..79001e761dca9e6a949b2e20e8a4a7e8d5014969 100644 (file)
@@ -1915,14 +1915,18 @@ This is a synonym for @samp{%H:%M:%S}.
 This stands for the numeric day of week (1--7).  Monday is day 1.
 @item %U
 This stands for the week of the year (01--52), assuming that weeks
-start on Sunday.
+start on Sunday.  If January 1 is not a Sunday, the first partial week
+is week zero.
 @item %V
-This stands for the week of the year according to ISO 8601.
+This stands for the week of the year according to ISO 8601.  Note that,
+unlike @samp{%U} and @samp{%W}, the week according to ISO 8601 does
+@emph{not} roll over to 1 on January 1, but keeps its last number.
 @item %w
 This stands for the numeric day of week (0--6).  Sunday is day 0.
 @item %W
-This stands for the week of the year (01--52), assuming that weeks
-start on Monday.
+This stands for the week of the year (01--52), assuming that weeks start
+on Monday.  If January 1 is not a Monday, the first partial week is week
+zero.
 @item %x
 This has a locale-specific meaning.  In the default locale (named
 @samp{C}), it is equivalent to @samp{%D}.