@@ -11,7 +11,8 @@ A small Python library to parse various kinds of time expressions,
1111inspired by
1212`this StackOverflow question <http://stackoverflow.com/questions/4628122/how-to-construct-a-timedelta-object-from-a-simple-string >`_.
1313
14- The single function ``timeparse `` defined in the module parses time
14+ The single function ``pytimeparse.timeparse.timeparse `` defined in the
15+ library (also available as ``pytimeparse.parse ``) parses time
1516expressions like the following:
1617
1718- ``32m ``
@@ -51,17 +52,17 @@ expressions like the following:
5152It returns the time as a number of seconds (an integer value if
5253possible, otherwise a floating-point number)::
5354
54- >>> from pytimeparse.timeparse import timeparse
55- >>> timeparse ('1.2 minutes')
55+ >>> from pytimeparse import parse
56+ >>> parse ('1.2 minutes')
5657 72
5758
5859A number of seconds can be converted back into a string using the
5960``datetime `` module in the standard library, as noted in
6061`this other StackOverflow question <http://stackoverflow.com/questions/538666/python-format-timedelta-to-string >`_::
6162
62- >>> from pytimeparse.timeparse import timeparse
63+ >>> from pytimeparse import parse
6364 >>> import datetime
64- >>> timeparse ('1 day, 14:20:16')
65+ >>> parse ('1 day, 14:20:16')
6566 138016
6667 >>> str(datetime.timedelta(seconds=138016))
6768 '1 day, 14:20:16'
0 commit comments