summaryrefslogtreecommitdiff
path: root/js/clock.js
diff options
context:
space:
mode:
authorsimon-ec <simon@eustaceconsulting.com>2026-04-15 16:25:09 -0400
committersimon-ec <simon@eustaceconsulting.com>2026-04-15 16:25:09 -0400
commit912a83581eaa21da3549926174fa76788a02df75 (patch)
tree7790ff8a477caa66578cc285fbea72622170a754 /js/clock.js
first init
Diffstat (limited to 'js/clock.js')
-rw-r--r--js/clock.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/clock.js b/js/clock.js
new file mode 100644
index 0000000..ac4f5af
--- /dev/null
+++ b/js/clock.js
@@ -0,0 +1,14 @@
+// prepare footer clock
+let clock = document.getElementById("clock");
+let timeFormat = new Intl.DateTimeFormat("en-US", {
+ dateStyle: "short",
+ timeStyle: "long",
+ timeZone: "America/New_York",
+});
+
+// start clock
+clock.innerText = timeFormat.format(Date.now());
+
+setInterval(() => {
+ clock.innerText = timeFormat.format(Date.now());
+}, 1000); \ No newline at end of file