summaryrefslogtreecommitdiff
path: root/js/clock.js
blob: ac4f5af0a045cd6fbb5eef0bbcd752af031724ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);