diff options
author | MM <14907823+MirMiz@users.noreply.github.com> | 2023-04-23 23:37:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-23 23:37:50 +0200 |
commit | 0671bb2dcdc6aea97e40bab2e8d709925c2b6471 (patch) | |
tree | dfe49555f8cff9a3580b9df101ef87ba80c55faf /layouts/partials/js.html | |
parent | 510dbe065b267d49e64666b810b6d148ae26c41f (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/js.html')
-rw-r--r-- | layouts/partials/js.html | 2 |
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') || ''; |