Fix bug in date formatting

The short format was never used.
This commit is contained in:
Steven Roose 2023-08-28 02:12:02 +01:00
parent 9f74868c72
commit 371edf5248
No known key found for this signature in database
GPG key ID: 2F2A88D7F8D68E87

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