From 2956b9927c340de0192bb195a65edf7434c887d6 Mon Sep 17 00:00:00 2001 From: Stefano Ginobili Date: Sat, 2 Sep 2023 17:27:35 +0200 Subject: [PATCH] :bug: Fix: use dateFormat function to render localized dates Co-authored-by: Stefano Ginobili Co-authored-by: Cell <1024@lruihao.cn> (cherry picked from commit 78416fa9206ac5976c8d3fb59dd8812cb5df9830) --- 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 ++-- layouts/taxonomy/list.html | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 13bc1a03..a5112f84 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -42,7 +42,7 @@
{{- .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 b2642cb9..dfeeb688 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 3b663291..d0fa909b 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -6,7 +6,7 @@