From 4c6f643762417ce2a9537704b179c6877c8a6a40 Mon Sep 17 00:00:00 2001 From: Stefano Ginobili Date: Sat, 2 Sep 2023 17:27:35 +0200 Subject: [PATCH] Use dateFormat function to render localized dates --- layouts/_default/section.html | 2 +- layouts/_default/summary.html | 2 +- layouts/partials/recently-updated.html | 2 +- layouts/partials/single/expiration-reminder.html | 2 +- layouts/partials/single/footer.html | 2 +- layouts/posts/single.html | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 13bc1a03b..a5112f844 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -42,7 +42,7 @@

{{ .Key }}

{{- .Title -}} - {{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}} + {{- .Date | dateFormat ($.Site.Params.section.dateFormat | default "01-02") -}}
{{- end -}} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index b2642cb94..dfeeb6881 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -34,7 +34,7 @@

- {{- with .Site.Params.dateformat | default "2006-01-02" | $updateTime.Format -}} + {{- with $updateTime | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}} {{- dict "Date" . | T "single.expirationReminder" -}} {{- end -}}
diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html index 3b6632915..d0fa909b5 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -6,7 +6,7 @@