diff options
Diffstat (limited to 'dash/prettytime.py')
-rw-r--r-- | dash/prettytime.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dash/prettytime.py b/dash/prettytime.py index 6e9e562..3cb47b4 100644 --- a/dash/prettytime.py +++ b/dash/prettytime.py @@ -13,5 +13,8 @@ def prettytime(seconds, prec = 2): else: output.append('{} {}'.format(time, unit)) + if len(output) == 0: + output.append('0 seconds') + return ', '.join(output[:prec]) |