mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Add more nuance to time filter
Saying X seconds is more precise than we need to be.
This commit is contained in:
@@ -303,6 +303,8 @@ def format_delta(date):
|
|||||||
)
|
)
|
||||||
if delta < timedelta(seconds=30):
|
if delta < timedelta(seconds=30):
|
||||||
return "just now"
|
return "just now"
|
||||||
|
if delta < timedelta(seconds=60):
|
||||||
|
return "in the last minute"
|
||||||
return ago.human(
|
return ago.human(
|
||||||
delta,
|
delta,
|
||||||
future_tense='{} from now', # No-one should ever see this
|
future_tense='{} from now', # No-one should ever see this
|
||||||
|
|||||||
Reference in New Issue
Block a user