From db7b0316a38b831092ed92b4dd63754b1b972db8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christopher=20Cot=C3=A9?= Date: Tue, 11 Jan 2022 10:56:58 -0500 Subject: [PATCH] update date formatting --- src/index.js | 7 ++++++- www/index.html | 5 +---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 92d3cdf6..352c5002 100644 --- a/src/index.js +++ b/src/index.js @@ -127,7 +127,12 @@ function image(image){ }); let dt = document.createElement("span"); dt.className = "datetime"; - dt.innerText = image.datetime; + options = { + year: 'numeric', month: 'numeric', day: 'numeric', + hour: 'numeric', minute: 'numeric', second: 'numeric', + hour12: false + } + dt.innerText = Intl.DateTimeFormat('en-US', options).format(image.datetime); w.appendChild(i); w.appendChild(u); w.appendChild(dt); diff --git a/www/index.html b/www/index.html index 0a52e6ec..d761bb5e 100644 --- a/www/index.html +++ b/www/index.html @@ -19,10 +19,6 @@ padding: 0; } - ul.image-tags{ - display: inline-block; - } - li{ padding: 3px; margin: 3px; @@ -56,6 +52,7 @@ } span.datetime{ + margin-top: 7px; float: right; font-size: 10px; } -- 2.45.3