Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fc850b

Browse files
committed
Improved footnote for the %Y directive slightly.
1 parent 085556a commit 5fc850b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/library/datetime.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,11 +1770,11 @@ Notes:
17701770

17711771
(5)
17721772
For technical reasons, :meth:`strftime` method does not support
1773-
dates with year < 1000: ``t.strftime(format)`` will raise a
1774-
:exc:`ValueError` even if ``format`` does not contain ``%Y``
1775-
directive. The :meth:`strptime` method can parse years in the full
1776-
[1, 9999] range, but years < 1000 must be zero-filled to 4-digit
1777-
width.
1773+
dates before year 1000: ``t.strftime(format)`` will raise a
1774+
:exc:`ValueError` when ``t.year < 1000`` even if ``format`` does
1775+
not contain ``%Y`` directive. The :meth:`strptime` method can
1776+
parse years in the full [1, 9999] range, but years < 1000 must be
1777+
zero-filled to 4-digit width.
17781778

17791779
.. versionchanged:: 3.2
17801780
In previous versions, :meth:`strftime` method was restricted to

0 commit comments

Comments
 (0)