Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ffa445

Browse files
committed
Fix second description of handling 2-digit years (last item in
introductory text).
1 parent d6ced7d commit 6ffa445

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

Doc/lib/libtime.tex

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,28 @@ \section{\module{time} ---
8080
\item
8181
The time tuple as returned by \function{gmtime()},
8282
\function{localtime()}, and \function{strptime()}, and accepted by
83-
\function{asctime()}, \function{mktime()} and \function{strftime()}, is a
84-
tuple of 9 integers: year (e.g.\ 1993), month (1--12), day (1--31),
85-
hour (0--23), minute (0--59), second (0--59), weekday (0--6, monday is
86-
0), Julian day (1--366) and daylight savings flag (-1, 0 or 1).
87-
Note that unlike the \C{} structure, the month value is a range of 1-12, not
88-
0-11. A year value less than 100 will typically be silently converted to
89-
1900 plus the year value. A \code{-1} argument as daylight savings
90-
flag, passed to \function{mktime()} will usually result in the correct
91-
daylight savings state to be filled in.
83+
\function{asctime()}, \function{mktime()} and \function{strftime()},
84+
is a tuple of 9 integers: year (e.g.\ 1993), month (1--12), day
85+
(1--31), hour (0--23), minute (0--59), second (0--59), weekday (0--6,
86+
monday is 0), Julian day (1--366) and daylight savings flag (-1, 0 or
87+
1). Note that unlike the \C{} structure, the month value is a range
88+
of 1-12, not 0-11. A year value will be handled as descibed under
89+
``Year 2000 (Y2K) issues'' above. A \code{-1} argument as daylight
90+
savings flag, passed to \function{mktime()} will usually result in the
91+
correct daylight savings state to be filled in.
9292

9393
\end{itemize}
9494

9595
The module defines the following functions and data items:
9696

9797

98+
\begin{datadesc}{accept2dyear}
99+
Boolean value indicating whether two-digit year values will be
100+
accepted. This is true by default, but will be set to false if the
101+
environment variable \envvar{PYTHONY2K} has been set to a non-empty
102+
string. It may also be modified at run time.
103+
\end{datadesc}
104+
98105
\begin{datadesc}{altzone}
99106
The offset of the local DST timezone, in seconds west of the 0th
100107
meridian, if one is defined. Negative if the local DST timezone is

0 commit comments

Comments
 (0)