From: Christopher Coté Date: Tue, 11 Jan 2022 15:56:58 +0000 (-0500) Subject: update date formatting X-Git-Url: http://git.entropealabs.com/?a=commitdiff_plain;h=db7b0316a38b831092ed92b4dd63754b1b972db8;p=photography.git update date formatting --- 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; }