From c99cf940a78606970a0aab9c74defca4517b6a5f Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Mon, 28 Aug 2023 05:43:09 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9Bfix(format=5Fdate):=20actually=20us?= =?UTF-8?q?e=20=20`short=5Fdate=5Fformat`=20(#119)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/macros/format_date.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/macros/format_date.html b/templates/macros/format_date.html index ea88bb5..74e4c98 100644 --- a/templates/macros/format_date.html +++ b/templates/macros/format_date.html @@ -7,7 +7,9 @@ {% set date_locale = "en_GB" %} {% endif %} -{% if config.extra.long_date_format and not short %} +{% if config.extra.short_date_format and short %} + {{ date | date(format=config.extra.short_date_format, locale=date_locale) }} +{% elif config.extra.long_date_format and not short %} {{ date | date(format=config.extra.long_date_format, locale=date_locale) }} {% elif not config.extra.short_date_format and date_locale == "en_GB" %} {% set day = date | date(format='%-d') | int %}