]> Entropealabs - photography.git/commitdiff
update date formatting
authorChristopher Coté <chris@entropealabs.com>
Tue, 11 Jan 2022 15:56:58 +0000 (10:56 -0500)
committerChristopher Coté <chris@entropealabs.com>
Tue, 11 Jan 2022 15:56:58 +0000 (10:56 -0500)
src/index.js
www/index.html

index 92d3cdf6a3dc9f325d2b5389811298eed3c43bb4..352c5002a62268b1f3b624f6c611d0bbeff01547 100644 (file)
@@ -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);
index 0a52e6ec67eff191d655879e8a73ae4c4a1de96c..d761bb5e8f6672317247d494e1142754d9674964 100644 (file)
         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;
       }