Merge pull request #1339 from alphagov/quis-patch-1

Add more nuance to time filter
This commit is contained in:
Chris Hill-Scott
2017-06-27 17:12:27 +01:00
committed by GitHub

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