From: Alexander Belopolsky Date: Mon, 10 Jan 2011 23:31:51 +0000 (+0000) Subject: Improved footnote for the %Y directive slightly. X-Git-Tag: v3.2rc1~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fc850b45528dc052a4dd3cd52d9572ecb187452;p=python Improved footnote for the %Y directive slightly. --- diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index 4ed1e01af7..de9ad449b2 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1770,11 +1770,11 @@ Notes: (5) For technical reasons, :meth:`strftime` method does not support - dates with year < 1000: ``t.strftime(format)`` will raise a - :exc:`ValueError` even if ``format`` does not contain ``%Y`` - directive. The :meth:`strptime` method can parse years in the full - [1, 9999] range, but years < 1000 must be zero-filled to 4-digit - width. + 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 + parse years in the full [1, 9999] range, but years < 1000 must be + zero-filled to 4-digit width. .. versionchanged:: 3.2 In previous versions, :meth:`strftime` method was restricted to