Add more nuance to time filter

Saying X seconds is more precise than we need to be.
This commit is contained in:
Chris Hill-Scott
2017-06-26 15:41:08 +01:00
parent c4684c692b
commit 75e9d0949c

View File

@@ -303,6 +303,8 @@ def format_delta(date):
)
if delta < timedelta(seconds=30):
return "just now"
if delta < timedelta(seconds=60):
return "in the last minute"
return ago.human(
delta,
future_tense='{} from now', # No-one should ever see this