-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
23 lines (21 loc) · 967 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
console.log(
"I didnt write a poem for six years because I was afraid of what would happen once I turned the rusty faucet on. I was afraid I would lose myself. "
);
console.log(
"I was afraid I had forgotten how. More than anything, I think, I was afraid to be bad at something. "
);
var countDownDate = new Date("August 17, 2022 12:00:00").getTime();
var x = setInterval(function () {
var now = new Date().getTime();
var distance = countDownDate - 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("demo").innerHTML =
days + "d " + hours + "h " + minutes + "m " + seconds + "s ";
if (distance < 0) {
clearInterval(x);
document.getElementById("demo").innerHTML = "EXPIRED";
}
}, 1000);