[Python-checkins] python/dist/src/Doc/lib libdatetime.tex, 1.53, 1.54

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Thu Jan 13 05:12:59 CET 2005


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27707/Doc/Lib

Modified Files:
	libdatetime.tex 
Log Message:
Add strptime() constructor to datetime class.  Thanks to Josh Spoerri for
the changes.


Index: libdatetime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- libdatetime.tex	15 Nov 2004 03:50:16 -0000	1.53
+++ libdatetime.tex	13 Jan 2005 04:12:26 -0000	1.54
@@ -624,6 +624,15 @@
   ignored.
   \end{methoddesc}
 
+\begin{methoddesc}{strptime}{date_string, format}
+  Return a \class{datetime} corresponding to \var{date_string}, parsed
+  according to \var{format}.  This is equivalent to
+  \code{datetime(*(time.strptime(date_string,
+  format)[0:6]))}. \exception{ValueError} is raised if the date_string and
+  format can't be parsed by \function{time.strptime()} or if it returns a
+  value which isn't a time tuple.
+\end{methoddesc}
+
 Class attributes:
 
 \begin{memberdesc}{min}



More information about the Python-checkins mailing list