Skip to content

Commit 0e5ef8b

Browse files
author
marat
committed
Update datetime.rst
1 parent a51dad6 commit 0e5ef8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/datetime.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,8 +2766,8 @@ Notes:
27662766
for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%j``, ``%U``,
27672767
``%W``, and ``%V``. Format ``%y`` does require a leading zero.
27682768

2769-
When used with the :meth:`~.datetime.strftime` method, the leading zero is optional
2770-
for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%j``, ``%U``,
2769+
When used with the :meth:`~.datetime.strftime` method, leading zeroes are included
2770+
by default for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%j``, ``%U``,
27712771
``%W``, ``%V`` and ``%y``. The ``%-`` flag (for example, ``%-d``) will produce
27722772
non-zero-padded output, except for ``%-y`` on Apple platforms, which is still
27732773
zero-padded.

0 commit comments

Comments
 (0)