Skip to content
Snippets Groups Projects
Commit 5101e575 authored by Calen Pennington's avatar Calen Pennington
Browse files

Adding documentation for parse_timedelta

parent 08220e09
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,15 @@ def item(l, default="", process=lambda x: x):
def parse_timedelta(time_str):
"""
time_str: A string with the following components:
<D> day[s] (optional)
<H> hour[s] (optional)
<M> minute[s] (optional)
<S> second[s] (optional)
Returns a datetime.timedelta parsed from the string
"""
parts = TIMEDELTA_REGEX.match(time_str)
if not parts:
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment