const targetDate = new Date("January 1, 2027 00:00:00").getTime(); function updateCountdown() { const now = new Date().getTime(); const difference = targetDate - now; if (difference > 0) { const days = Math.floor(difference / (1000 * 60 * 60 * 24)); const hours = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((difference % (1000 * 60 * 60)) / (1000 * 60)); document.getElementById("days").innerText = String(days).padStart(2, '0'); document.getElementById("hours").innerText = String(hours).padStart(2, '0'); document.getElementById("minutes").innerText = String(minutes).padStart(2, '0'); } } updateCountdown(); setInterval(updateCountdown, 1000);