From 0671bb2dcdc6aea97e40bab2e8d709925c2b6471 Mon Sep 17 00:00:00 2001 From: MM <14907823+MirMiz@users.noreply.github.com> Date: Sun, 23 Apr 2023 23:37:50 +0200 Subject: changed reference to attribute which contins the date `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/partials/js.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/partials') diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 9e4dd9d..691b8dc 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -103,7 +103,7 @@ var elements = document.querySelectorAll('.relative-time'); for (var i = 0; i < elements.length; i++) { var element = elements[i]; - var time = Date.parse(element.getAttribute('title')); + var time = Date.parse(element.dataset.date); var html = element.getAttribute('data-time-prefix') || ''; -- cgit v1.2.3-70-g09d2