diff options
author | Skip Montanaro <skip@pobox.com> | 2005-01-13 04:12:31 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2005-01-13 04:12:31 (GMT) |
commit | 0af3ade6aa597a8871dbb62c312a8ab62e3cd309 (patch) | |
tree | a7d4665e4c36907f627780ebbd7bff17f2e0b46b /Doc | |
parent | 2f8c6589f5bb1a2e360d040bc38996d95bfca511 (diff) | |
download | cpython-0af3ade6aa597a8871dbb62c312a8ab62e3cd309.zip cpython-0af3ade6aa597a8871dbb62c312a8ab62e3cd309.tar.gz cpython-0af3ade6aa597a8871dbb62c312a8ab62e3cd309.tar.bz2 |
Add strptime() constructor to datetime class. Thanks to Josh Spoerri for
the changes.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libdatetime.tex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/lib/libdatetime.tex b/Doc/lib/libdatetime.tex index caf6bbc..7f8b8bb 100644 --- a/Doc/lib/libdatetime.tex +++ b/Doc/lib/libdatetime.tex @@ -624,6 +624,15 @@ Other constructors, all class methods: 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} |