diff Doc/lib/libdatetime.tex @ 34416:563cbf4d6be4 legacy-trunk

Add strptime() constructor to datetime class. Thanks to Josh Spoerri for the changes.
author Skip Montanaro <skip@pobox.com>
date Thu, 13 Jan 2005 04:12:31 +0000
parents a8de2195efd6
children 269a2c14bc57
line wrap: on
line diff
--- a/Doc/lib/libdatetime.tex	Wed Jan 12 19:11:45 2005 +0000
+++ b/Doc/lib/libdatetime.tex	Thu Jan 13 04:12:31 2005 +0000
@@ -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}