-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
20 lines (16 loc) · 701 Bytes
/
script.js
File metadata and controls
20 lines (16 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var countDownDate = new Date(Date.now() + 999999999).getTime();
var x = setInterval(function () {
var distance = countDownDate - Date.now();
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor(
(distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
);
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
document.getElementById("countdown").innerHTML =
days + ":" + hours + ":" + minutes + ":" + seconds;
if (distance < 0) {
clearInterval(x);
document.getElementById("countdown").innerHTML = "Chase ur dreams.";
}
}, 1000);