diff --git a/time.js b/time.js index d31b90d..0d35b21 100644 --- a/time.js +++ b/time.js @@ -3,13 +3,18 @@ function updateTime() { timeZone: 'Asia/Kathmandu', hour12: false, hour: '2-digit', - minute: '2-digit', - month: 'short', - day: 'numeric', }; const now = new Date().toLocaleString('en-US', options); + const currentHour = parseInt(now.substring(0, 2)); + document.getElementById('time-display').innerText = now; + + if (currentHour >= 18) { + document.body.style.backgroundColor = 'black'; + } else { + document.body.style.backgroundColor = 'white'; // or your preferred default color + } } // Update time every second