diff --git a/accounting/templates/accounting/cash.html b/accounting/templates/accounting/cash.html index bee3383..857f80a 100644 --- a/accounting/templates/accounting/cash.html +++ b/accounting/templates/accounting/cash.html @@ -49,7 +49,7 @@ First written: 2020/7/1 {% for record in records %} - {{ record.transaction.date|human_date }} + {{ record.transaction.date|smart_date }} {{ record.subject.title_zhtw }} {{ record.summary }} {{ record.debit_amount|intcomma:False }} diff --git a/mia_core/templatefilters.py b/mia_core/templatefilters.py index cd275be..a233330 100644 --- a/mia_core/templatefilters.py +++ b/mia_core/templatefilters.py @@ -25,7 +25,7 @@ register = template.Library() @register.filter(is_safe=True) -def human_date(value): +def smart_date(value): """Formats the date for human friendliness. Args: