chore: docstring for pretty_date

This commit is contained in:
barredterra 2023-04-11 15:50:17 +02:00
parent 9f1feaab02
commit fcb705b41d

View file

@ -1514,9 +1514,9 @@ def escape_html(text: str) -> str:
def pretty_date(iso_datetime: datetime.datetime | str) -> str:
"""
Takes an ISO time and returns a string representing how
long ago the date represents.
Ported from PrettyDate by John Resig
Return a localized string representation of the delta to the current system time.
For example, "1 hour ago", "2 days ago", "in 5 seconds", etc.
"""
if not iso_datetime:
return ""