summaryrefslogtreecommitdiffstats
path: root/Doc/library/datetime.rst
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-05-02 17:14:24 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2011-05-02 17:14:24 (GMT)
commit89da349b7be56000e4b0efbe11ec4958af691b42 (patch)
tree0f6a529fb790429d25c0eb73c7c66c8836642dc3 /Doc/library/datetime.rst
parent9d8c3b7cef1f235e92b018924ca21e0d1a49efd7 (diff)
downloadcpython-89da349b7be56000e4b0efbe11ec4958af691b42.zip
cpython-89da349b7be56000e4b0efbe11ec4958af691b42.tar.gz
cpython-89da349b7be56000e4b0efbe11ec4958af691b42.tar.bz2
Issue #11930: Remove year >= 1000 limitation from datetime.strftime.
Patch by Victor Stinner.
Diffstat (limited to 'Doc/library/datetime.rst')
-rw-r--r--Doc/library/datetime.rst8
1 files changed, 2 insertions, 6 deletions
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index c637f6a..2eb5ea0 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -1750,8 +1750,7 @@ format codes.
| | decimal number [00,99]. | |
+-----------+--------------------------------+-------+
| ``%Y`` | Year with century as a decimal | \(5) |
-| | number [0001,9999] (strptime), | |
-| | [1000,9999] (strftime). | |
+| | number [0001,9999]. | |
+-----------+--------------------------------+-------+
| ``%z`` | UTC offset in the form +HHMM | \(6) |
| | or -HHMM (empty string if the | |
@@ -1785,10 +1784,7 @@ Notes:
calculations when the day of the week and the year are specified.
(5)
- For technical reasons, :meth:`strftime` method does not support
- dates before year 1000: ``t.strftime(format)`` will raise a
- :exc:`ValueError` when ``t.year < 1000`` even if ``format`` does
- not contain ``%Y`` directive. The :meth:`strptime` method can
+ The :meth:`strptime` method can
parse years in the full [1, 9999] range, but years < 1000 must be
zero-filled to 4-digit width.