From 2997837158d4715749632f4edbdf690ba619dc85 Mon Sep 17 00:00:00 2001 From: Alexander Belopolsky Date: Sat, 8 Jan 2011 20:47:21 +0000 Subject: Fixed documentation to reflect recent changes for years < 1900. --- Doc/library/datetime.rst | 8 ++++++-- Doc/library/time.rst | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index b9adbcc..cad0eb4 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -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 ` for details. +-----------+--------------------------------+-------+ | Directive | Meaning | Notes | diff --git a/Doc/library/time.rst b/Doc/library/time.rst index dc102d6..b8745a6 100644 --- a/Doc/library/time.rst +++ b/Doc/library/time.rst @@ -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 -- cgit v0.12 size='10' name='q' value=''/>
Commit message (Expand)AuthorAgeFilesLines
* Issue #13964: signal.sigtimedwait() timeout is now a float instead of a tupleVictor Stinner2012-03-021-0/+11
* Issue #14153 Create _Py_device_encoding() to prevent _io from having to importBrett Cannon2012-02-291-0/+2
* the days of pre-standard C compilers are goneBenjamin Peterson2012-02-261-10/+0
* Close issue #6210: Implement PEP 409Nick Coghlan2012-02-261-0/+1
* - Issue #10181: New memoryview implementation fixes multiple ownershipStefan Krah2012-02-253-49/+44
* Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separatorVictor Stinner2012-02-231-15/+3
* Fix test failure in test_cmd_line by initializing the hash secret at the earl...Antoine Pitrou2012-02-212-0/+3
|\
| * Fix test failure in test_cmd_line by initializing the hash secret at the earl...Antoine Pitrou2012-02-212-0/+3
* | merge 3.2Benjamin Peterson2012-02-211-0/+4
|\ \ | |/
| * merge 3.2Benjamin Peterson2012-02-211-0/+4
| |\
| | * ensure no one tries to hash things before the random seed is foundBenjamin Peterson2012-02-211-0/+4
* | | Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-203-0/+9
|\ \ \ | |/ /
| * | Merge from 3.1: Issue #13703: add a way to randomize the hash values of basic...Georg Brandl2012-02-203-0/+9
| |\ \ | | |/
| | * Issue #13703: add a way to randomize the hash values of basic types (str, byt...Georg Brandl2012-02-203-0/+9
| | * onto 3.1.5Benjamin Peterson2011-06-111-1/+1
| | * bump to 3.1.4v3.1.4Benjamin Peterson2011-06-111-3/+3
| | * bump to 3.1.4rc1Benjamin Peterson2011-05-291-4/+4
| | * Port 5b607cd8c71b (closes #11892)Jesus Cea2011-04-201-0/+4
* | | add generic implementation of a __dict__ descriptor for C typesBenjamin Peterson2012-02-201-0/+2
* | | Backout f8409b3d6449: the PEP 410 is not accepted yetVictor Stinner2012-02-081-27/+1
* | | PEP 410Victor Stinner2012-02-081-1/+27
* | | Issue #13706: Add assertions to detect bugs earlierVictor Stinner2012-01-311-0/+3
* | | Issue #13848: open() and the FileIO constructor now check for NUL characters ...Antoine Pitrou2012-01-291-0/+6
|\ \ \ | |/ /
| * | Issue #13848: open() and the FileIO constructor now check for NUL characters ...Antoine Pitrou2012-01-291-0/+6
* | | use the static identifier api for looking up special methodsBenjamin Peterson2012-01-222-30/+30
* | | Issue #12705: Raise SyntaxError when compiling multiple statements as single ...Meador Inge2012-01-191-0/+1
* | | Issue #13727: Add 3 macros to access PyDateTime_Delta members:Amaury Forgeot d'Arc2012-01-171-0/+6
* | | move LINENO define to where it actually belongsBenjamin Peterson2012-01-161-0/+1
* | | Issue #13629: Renumber the tokens in token.h to match the _PyParser_TokenName...Meador Inge2012-01-161-31/+30
|\ \ \ | |/ /
| * | Issue #13629: Renumber the tokens in token.h to match the _PyParser_TokenName...Meador Inge2012-01-161-31/+30
* | | Consolidate the occurrances of the prime used as the multiplier when hashing.Gregory P. Smith2012-01-14