From fcb705b41da51230e280df00c1aad08ed1f83f5a Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Tue, 11 Apr 2023 15:50:17 +0200 Subject: [PATCH] chore: docstring for pretty_date --- frappe/utils/data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/utils/data.py b/frappe/utils/data.py index f2bcc8e4df..a51cdee04a 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -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 ""