New files.

This commit is contained in:
Purplebored
2024-02-16 22:07:14 +01:00
parent cb387a8199
commit 44eee774fd
3 changed files with 75 additions and 0 deletions

16
script.js Normal file
View File

@@ -0,0 +1,16 @@
// Time Widget.
function updateTime() {
const now = new Date();
const options = {
timeZone: 'Europe/Warsaw',
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
hour12: false
};
const timeString = now.toLocaleTimeString('en-US', options);
document.getElementById('time').textContent = timeString;
}
updateTime();
setInterval(updateTime, 1000);