Time Count
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Countdown</title>
</head>
<body style="background:black;color:white;text-align:center;padding-top:100px;font-family:Arial">
<h1>Countdown to 20 May 2026</h1>
<h2 id="timer">Loading...</h2>
<script>
// 20 May 2026, 00:00:00 Bangladesh Time
var target = new Date(2026, 4, 20, 0, 0, 0).getTime();
setInterval(function () {
var now = new Date().getTime();
var diff = target - now;
if (diff <= 0) {
document.getElementById("timer").innerHTML = "TIME REACHED 🎉";
return;
}
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
var hours = Math.floor((diff / (1000 * 60 * 60)) % 24);
var minutes = Math.floor((diff / (1000 * 60)) % 60);
var seconds = Math.floor((diff / 1000) % 60);
document.getElementById("timer").innerHTML =
days + " Days " +
hours + " Hours " +
minutes + " Minutes " +
seconds + " Seconds";
}, 1000);
</script>
</body>
</html>
Comments
Post a Comment