Shrink the precision of 'ago' datetimes so they stay compact

This commit is contained in:
Danielle McLean 2018-07-01 14:56:24 +10:00
parent 6d7b5db482
commit 6c9b6eb061
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240

View file

@ -6,4 +6,4 @@ def ago(dt: datetime) -> str:
# We have to convert the datetime we get to local time first, because ago
# just strips the timezone from a timezone-aware datetime.
dt = dt.astimezone()
return human(dt, past_tense='{}', abbreviate=True)
return human(dt, precision=1, past_tense='{}', abbreviate=True)