aboutsummaryrefslogtreecommitdiff
path: root/src/utils/datetime
diff options
context:
space:
mode:
authorGravatar jesopo2020-02-28 22:56:45 +0000
committerGravatar jesopo2020-02-28 22:57:00 +0000
commit078d8ecd6bc50f937c74fe6c3acef748939ae3c1 (patch)
tree355a9c5e5a611c97e0b6745aa90b92ae5b4bdcfe /src/utils/datetime
parentinclude !command in usage output (diff)
signature
less-than-1.0 should be to_pretty_time "0s"
Diffstat (limited to 'src/utils/datetime')
-rw-r--r--src/utils/datetime/format.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/datetime/format.py b/src/utils/datetime/format.py
index 0a3bc0ab..889f5906 100644
--- a/src/utils/datetime/format.py
+++ b/src/utils/datetime/format.py
@@ -50,7 +50,7 @@ def time_unit(seconds: int) -> typing.Tuple[int, str]:
def to_pretty_time(total_seconds: int, max_units: int=UNIT_MINIMUM,
direction: typing.Optional[RelativeDirection]=None) -> str:
- if total_seconds == 0:
+ if total_seconds < 1:
return "0s"
if not direction == None: