Commit 3f4b2fd1 authored by Alexander Belopolsky's avatar Alexander Belopolsky

Fixed documentation to reflect recent changes for years < 1900.

parent 15157d4c
...@@ -1661,8 +1661,12 @@ version) requires, and these work on all platforms with a standard C ...@@ -1661,8 +1661,12 @@ version) requires, and these work on all platforms with a standard C
implementation. Note that the 1999 version of the C standard added additional implementation. Note that the 1999 version of the C standard added additional
format codes. format codes.
The exact range of years for which :meth:`strftime` works also varies across The exact range of years for which :meth:`strftime` works also varies
platforms. Regardless of platform, years before 1900 cannot be used. across platforms. Regardless of platform, years before 1000 cannot be
used with ``datetime`` module ``strftime()`` methods. The ``time``
module ``strftime()`` function exibit different behavior depending on
the value of ``time.accept2dyear`` variable. See :ref:`Year 2000
(Y2K) issues <time-y2kissues>` for details.
+-----------+--------------------------------+-------+ +-----------+--------------------------------+-------+
| Directive | Meaning | Notes | | Directive | Meaning | Notes |
......
...@@ -120,10 +120,19 @@ The module defines the following functions and data items: ...@@ -120,10 +120,19 @@ The module defines the following functions and data items:
.. data:: accept2dyear .. data:: accept2dyear
Boolean value indicating whether two-digit year values will be accepted. This Boolean value indicating whether two-digit year values will be
is true by default, but will be set to false if the environment variable mapped to 1969--2068 range by :func:`asctime`, :func:`mktime`, and
:envvar:`PYTHONY2K` has been set to a non-empty string. It may also be modified :func:`strftime` functions. This is true by default, but will be
at run time. set to false if the environment variable :envvar:`PYTHONY2K` has
been set to a non-empty string. It may also be modified at run
time.
.. deprecated:: 3.2
Mapping of 2-digit year values by :func:`asctime`,
:func:`mktime`, and :func:`strftime` functions to 1969--2068
range is deprecated. Programs that need to process 2-digit
years should use ``%y`` code available in :func:`strptime`
function or convert 2-digit year values to 4-digit themselves.
.. data:: altzone .. data:: altzone
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment