🐛fix(format_date): actually use short_date_format (#119)

This commit is contained in:
Steven Roose 2023-08-28 05:43:09 -05:00 committed by GitHub
parent 9f74868c72
commit c99cf940a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 %}