diff options
| author | simon-ec <simon@eustaceconsulting.com> | 2026-04-15 16:25:09 -0400 |
|---|---|---|
| committer | simon-ec <simon@eustaceconsulting.com> | 2026-04-15 16:25:09 -0400 |
| commit | 912a83581eaa21da3549926174fa76788a02df75 (patch) | |
| tree | 7790ff8a477caa66578cc285fbea72622170a754 /js/clock.js | |
first init
Diffstat (limited to 'js/clock.js')
| -rw-r--r-- | js/clock.js | 14 |
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 |
