[Python-checkins] python/dist/src/Doc/lib libtime.tex,1.48.6.1,1.48.6.2
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Wed, 13 Nov 2002 11:06:02 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv22554
Modified Files:
Tag: release22-maint
libtime.tex
Log Message:
Document struct_time and the field names.
Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.48.6.1
retrieving revision 1.48.6.2
diff -C2 -d -r1.48.6.1 -r1.48.6.2
*** libtime.tex 30 Oct 2002 18:18:08 -0000 1.48.6.1
--- libtime.tex 13 Nov 2002 19:06:00 -0000 1.48.6.2
***************
*** 74,97 ****
\item
! The time tuple as returned by \function{gmtime()},
\function{localtime()}, and \function{strptime()}, and accepted by
\function{asctime()}, \function{mktime()} and \function{strftime()},
! is a tuple of 9 integers:
! \begin{tableiii}{r|l|l}{textrm}{Index}{Field}{Values}
! \lineiii{0}{year}{(for example, 1993)}
! \lineiii{1}{month}{range [1,12]}
! \lineiii{2}{day}{range [1,31]}
! \lineiii{3}{hour}{range [0,23]}
! \lineiii{4}{minute}{range [0,59]}
! \lineiii{5}{second}{range [0,61]; see \strong{(1)} in \function{strftime()} description}
! \lineiii{6}{weekday}{range [0,6], Monday is 0}
! \lineiii{7}{Julian day}{range [1,366]}
! \lineiii{8}{daylight savings flag}{0, 1 or -1; see below}
\end{tableiii}
Note that unlike the C structure, the month value is a
range of 1-12, not 0-11. A year value will be handled as described
! under ``Year 2000 (Y2K) issues'' above. A \code{-1} argument as
daylight savings flag, passed to \function{mktime()} will usually
result in the correct daylight savings state to be filled in.
--- 74,99 ----
\item
! The time value as returned by \function{gmtime()},
\function{localtime()}, and \function{strptime()}, and accepted by
\function{asctime()}, \function{mktime()} and \function{strftime()},
! is a sequence of 9 integers. The return values of \function{gmtime()},
! \function{localtime()}, and \function{strptime()} also offer attribute
! names for individual fields.
! \begin{tableiii}{c|l|l}{textrm}{Index}{Attribute}{Values}
! \lineiii{0}{\member{tm_year}}{(for example, 1993)}
! \lineiii{1}{\member{tm_mon}}{range [1,12]}
! \lineiii{2}{\member{tm_mday}}{range [1,31]}
! \lineiii{3}{\member{tm_hour}}{range [0,23]}
! \lineiii{4}{\member{tm_min}}{range [0,59]}
! \lineiii{5}{\member{tm_sec}}{range [0,61]; see \strong{(1)} in \function{strftime()} description}
! \lineiii{6}{\member{tm_wday}}{range [0,6], Monday is 0}
! \lineiii{7}{\member{tm_yday}}{range [1,366]}
! \lineiii{8}{\member{tm_isdst}}{0, 1 or -1; see below}
\end{tableiii}
Note that unlike the C structure, the month value is a
range of 1-12, not 0-11. A year value will be handled as described
! under ``Year 2000 (Y2K) issues'' above. A \code{-1} argument as the
daylight savings flag, passed to \function{mktime()} will usually
result in the correct daylight savings state to be filled in.
***************
*** 101,104 ****
--- 103,109 ----
\exception{TypeError} is raised.
+ \versionchanged[The time value sequence was changed from a tuple to a
+ specialized type, with the addition of attribute names
+ for the fields]{2.2}
\end{itemize}
***************
*** 292,295 ****
--- 297,306 ----
Availability: Most modern \UNIX{} systems.
\end{funcdesc}
+
+ \begin{datadesc}{struct_time}
+ The type of the time value sequence returned by \function{gmtime()},
+ \function{localtime()}, and \function{strptime()}.
+ \versionadded{2.2}
+ \end{datadesc}
\begin{funcdesc}{time}{}