Commit 9a5de1a5 authored by Barry Warsaw's avatar Barry Warsaw

Added the timedelta standard datatype, which is similar to time-interval, but

returns a datetime.timedelta instead of a float.

Added test case and documentation.
parent 3c4b7f71
...@@ -930,6 +930,13 @@ The following data types are provided by the default type registry. ...@@ -930,6 +930,13 @@ The following data types are provided by the default type registry.
and may be \samp{s} (seconds), \samp{m} (minutes), \samp{h} (hours), and may be \samp{s} (seconds), \samp{m} (minutes), \samp{h} (hours),
or \samp{d} (days). or \samp{d} (days).
\term{\datatype{timedelta}}
Similar to the \datatype{time-interval}, this data type returns a Python
datetime.timedelta object instead of a float. The set of suffixes
recognized by \datatype{timedelta} are: \samp{w} (weeks), \samp{d} (days),
\samp{h} (hours), \samp{m} (minutes), \samp{s} (seconds). Values may be
floats, for example: \code{4w 2.5d 7h 12m 0.001s}.
\end{definitions} \end{definitions}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment