From 078d8ecd6bc50f937c74fe6c3acef748939ae3c1 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 28 Feb 2020 22:56:45 +0000 Subject: [PATCH] less-than-1.0 should be to_pretty_time "0s" --- src/utils/datetime/format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: