Skip to content

Commit 8da17bb

Browse files
[3.12] gh-89762: Document strftime %G, %V, and %u format specifiers (GH-124572) (#126095)
(cherry picked from commit 85799f1) Co-authored-by: RUANG (James Roy) <[email protected]>
1 parent d89283b commit 8da17bb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Doc/library/time.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ Functions
460460
| | | |
461461
| | | |
462462
+-----------+------------------------------------------------+-------+
463+
| ``%u`` | Day of the week (Monday is 1; Sunday is 7) | |
464+
| | as a decimal number [1, 7]. | |
465+
+-----------+------------------------------------------------+-------+
463466
| ``%w`` | Weekday as a decimal number [0(Sunday),6]. | |
464467
| | | |
465468
+-----------+------------------------------------------------+-------+
@@ -492,6 +495,16 @@ Functions
492495
| ``%Z`` | Time zone name (no characters if no time zone | |
493496
| | exists). Deprecated. [1]_ | |
494497
+-----------+------------------------------------------------+-------+
498+
| ``%G`` | ISO 8601 year (similar to ``%Y`` but follows | |
499+
| | the rules for the ISO 8601 calendar year). | |
500+
| | The year starts with the week that contains | |
501+
| | the first Thursday of the calendar year. | |
502+
+-----------+------------------------------------------------+-------+
503+
| ``%V`` | ISO 8601 week number (as a decimal number | |
504+
| | [01,53]). The first week of the year is the | |
505+
| | one that contains the first Thursday of the | |
506+
| | year. Weeks start on Monday. | |
507+
+-----------+------------------------------------------------+-------+
495508
| ``%%`` | A literal ``'%'`` character. | |
496509
+-----------+------------------------------------------------+-------+
497510

0 commit comments

Comments
 (0)