aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authorMM <14907823+MirMiz@users.noreply.github.com>2023-04-23 23:37:50 +0200
committerGitHub <noreply@github.com>2023-04-23 23:37:50 +0200
commit0671bb2dcdc6aea97e40bab2e8d709925c2b6471 (patch)
treedfe49555f8cff9a3580b9df101ef87ba80c55faf /layouts/partials
parent510dbe065b267d49e64666b810b6d148ae26c41f (diff)
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
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/js.html2
1 files changed, 1 insertions, 1 deletions
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') || '';