Kaydet (Commit) 29978371 authored tarafından Alexander Belopolsky's avatar Alexander Belopolsky

Fixed documentation to reflect recent changes for years < 1900.

üst 3ec899fc
......@@ -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
format codes.
The exact range of years for which :meth:`strftime` works also varies across
platforms. Regardless of platform, years before 1900 cannot be used.
The exact range of years for which :meth:`strftime` works also varies
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 |
......
......@@ -120,10 +120,19 @@ The module defines the following functions and data items:
.. data:: accept2dyear
Boolean value indicating whether two-digit year values will be accepted. This
is true by default, but will be 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.
Boolean value indicating whether two-digit year values will be
mapped to 1969--2068 range by :func:`asctime`, :func:`mktime`, and
:func:`strftime` functions. This is true by default, but will be
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
......
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