mirror of https://github.com/snachodog/mybuddy.git
Add condition on tummytime-duration.py in order to display hours when necessary
This commit is contained in:
parent
6f83611f42
commit
9e1c21e7bd
|
@ -70,4 +70,7 @@ def _duration_string_ms(duration):
|
|||
:returns: a string of the form Xm.
|
||||
"""
|
||||
h, m, s = duration_parts(duration)
|
||||
return "{}m{}s".format(m, s)
|
||||
if h > 0:
|
||||
return "{}h{}m{}s".format(h, m, s)
|
||||
else:
|
||||
return "{}m{}s".format(m, s)
|
||||
|
|
Loading…
Reference in New Issue