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 @@
{{- partial "single/post-author.html" . -}}
- {{- with .Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format -}}
+ {{- with .PublishDate | dateFormat (.Site.Params.dateFormat | default "2006-01-02") -}}
{{- printf `` . . | dict "Date" | T "single.publishedOnDate" | safeHTML -}}
diff --git a/layouts/partials/recently-updated.html b/layouts/partials/recently-updated.html
index 46119ea2..de2d70f9 100644
--- a/layouts/partials/recently-updated.html
+++ b/layouts/partials/recently-updated.html
@@ -14,7 +14,7 @@
{{- .Title -}}
- {{- with .Site.Params.section.dateformat | default "01-02" | .Lastmod.Format -}}
+ {{- with .Lastmod | dateFormat (.Site.Params.section.dateformat | default "01-02") -}}
{{- dict "Date" . | T "single.updatedOnDate" -}}
{{- end -}}
diff --git a/layouts/partials/single/expiration-reminder.html b/layouts/partials/single/expiration-reminder.html
index 32406138..306588c7 100644
--- a/layouts/partials/single/expiration-reminder.html
+++ b/layouts/partials/single/expiration-reminder.html
@@ -20,7 +20,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 @@
- {{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
+ {{- with .Lastmod | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
{{- dict "Date" . | T "single.updatedOnDate" -}}
{{- if $gitRepo -}}
{{- with $.GitInfo -}}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index e156e843..4e9105fa 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -61,13 +61,13 @@
{{- end -}}
- {{- with .Site.Params.dateformat | default "2006-01-02" | .PublishDate.Format -}}
+ {{- with .PublishDate | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
{{- dict "Class" "fa-regular fa-calendar-alt fa-fw me-1" | partial "plugin/icon.html" -}}
{{- printf `` . . | safeHTML -}}
{{- end -}}
- {{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
+ {{- with .Lastmod | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
{{- dict "Class" "fa-regular fa-edit fa-fw me-1" | partial "plugin/icon.html" -}}
{{- printf `` . . | safeHTML -}}
diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html
index e4bbea4b..ff187160 100644
--- a/layouts/taxonomy/list.html
+++ b/layouts/taxonomy/list.html
@@ -32,8 +32,8 @@
{{- range .Pages -}}
{{- .Title -}}
-
- {{- $.Site.Params.list.dateFormat | default "01-02" | .Date.Format -}}
+
+ {{- .Date | dateFormat ($.Site.Params.list.dateFormat | default "01-02") -}}
{{- end -}}