From fea94cf3390954ad25cc12104991193adddb2632 Mon Sep 17 00:00:00 2001 From: MM <14907823+MirMiz@users.noreply.github.com> Date: Sun, 23 Apr 2023 23:09:54 +0200 Subject: use dateFormat instead of .Date.Format for better localization --- layouts/issues/small.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'layouts/issues/small.html') diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 5eb3a2d..9c21cfb 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -10,7 +10,7 @@ {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} + {{ dateFormat .Site.Params.dateFormat .Params.date }} {{ else }} {{ .Date.Format "January 2, 2006 at 3:04 PM" }} {{ end }} @@ -25,7 +25,7 @@ {{ else if .Params.Resolved }} {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} + {{ dateFormat .Site.Params.dateFormat .Params.date }} {{ else }} {{ .Date.Format "January 2, 2006 at 3:04 PM" }} {{ end }} -- cgit v1.2.3-70-g09d2 From 510dbe065b267d49e64666b810b6d148ae26c41f Mon Sep 17 00:00:00 2001 From: MM <14907823+MirMiz@users.noreply.github.com> Date: Sun, 23 Apr 2023 23:36:34 +0200 Subject: added Dateformat localization to `relative-time` `relative-time` didn't respected the dateformat, but defaultet on UTC. The Title-Attribute (hover) now displays time in the chosen dateformat. an additional Attribut `data-date` contains the UTC-Format for calculating the relative times using JavaScript --- layouts/issues/small.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'layouts/issues/small.html') diff --git a/layouts/issues/small.html b/layouts/issues/small.html index 9c21cfb..94fede3 100644 --- a/layouts/issues/small.html +++ b/layouts/issues/small.html @@ -8,7 +8,7 @@ {{ if .Params.informational }} - + {{ if .Site.Params.dateFormat }} {{ dateFormat .Site.Params.dateFormat .Params.date }} {{ else }} @@ -23,7 +23,7 @@ {{ else if .Params.Resolved }} - + {{ if .Site.Params.dateFormat }} {{ dateFormat .Site.Params.dateFormat .Params.date }} {{ else }} @@ -68,11 +68,11 @@ {{ else }} - + {{ if .Date.Before now }} {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} + {{ dateFormat .Site.Params.dateFormat .Params.date }} {{ else }} {{ .Date.Format "January 2, 2006 at 3:04 PM" }} {{ end }} @@ -94,7 +94,7 @@ {{ T "downtimeOngoing" }} {{ else }} {{ if .Site.Params.dateFormat }} - {{ .Date.Format .Site.Params.dateFormat }} + {{ dateFormat .Site.Params.dateFormat .Params.date }} {{ else }} {{ .Date.Format "January 2, 2006 at 3:04 PM" }} {{ end }} -- cgit v1.2.3-70-g09d2