From 7fefe217c8462444ecb9806599e70afe2a7102ea Mon Sep 17 00:00:00 2001 From: Paweł Bernaciak Date: Fri, 10 Feb 2023 21:24:11 +0100 Subject: Time display fixes --- CoreWiki/wwwroot/js/site.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CoreWiki/wwwroot/js') diff --git a/CoreWiki/wwwroot/js/site.js b/CoreWiki/wwwroot/js/site.js index ac49c18..02fb148 100644 --- a/CoreWiki/wwwroot/js/site.js +++ b/CoreWiki/wwwroot/js/site.js @@ -2,3 +2,11 @@ // for details on configuring this project to bundle and minify static web assets. // Write your JavaScript code. +(function () { + var timeStamps = document.querySelectorAll(".timeStampValue"); + for (var ts of timeStamps) { + var thisTimeStamp = ts.getAttribute("data-value"); + var date = new Date(thisTimeStamp); + ts.textContent = moment(date).format('LLL'); + } +})(); \ No newline at end of file -- cgit v1.2.3