diff options
| author | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2023-02-10 21:24:11 +0100 |
|---|---|---|
| committer | Paweł Bernaciak <pawelbernaciak@zohomail.eu> | 2023-02-10 21:24:11 +0100 |
| commit | 7fefe217c8462444ecb9806599e70afe2a7102ea (patch) | |
| tree | 49cd108ab96a756fe67ac58f980d1385c17e09df /CoreWiki/wwwroot/js | |
| parent | 00c3b32e2db200a2f42396ac7f8381704ec97268 (diff) | |
Time display fixes
Diffstat (limited to 'CoreWiki/wwwroot/js')
| -rw-r--r-- | CoreWiki/wwwroot/js/site.js | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
