mirror of
https://github.com/MrEidam/CubeTime.git
synced 2026-06-28 15:39:25 +00:00
19 lines
425 B
JavaScript
19 lines
425 B
JavaScript
setInterval(() => {
|
|
let hh;
|
|
let mm;
|
|
|
|
if(new Date().getHours()<=9){
|
|
hh = '0' + new Date().getHours();
|
|
}else{
|
|
hh = new Date().getHours();
|
|
}
|
|
|
|
if(new Date().getMinutes()<=9){
|
|
mm = '0' + new Date().getMinutes();
|
|
}else{
|
|
mm = new Date().getMinutes();
|
|
}
|
|
document.querySelectorAll('.side').forEach((e) => {
|
|
e.innerHTML = `${hh} : ${mm}`;
|
|
})
|
|
}, 1000); |