Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3f4b2fd1
Commit
3f4b2fd1
authored
Jan 08, 2011
by
Alexander Belopolsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed documentation to reflect recent changes for years < 1900.
parent
15157d4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
Doc/library/datetime.rst
Doc/library/datetime.rst
+6
-2
Doc/library/time.rst
Doc/library/time.rst
+13
-4
No files found.
Doc/library/datetime.rst
View file @
3f4b2fd1
...
@@ -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 |
...
...
Doc/library/time.rst
View file @
3f4b2fd1
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment