Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var deadline = new Date("Apr 12, 2020 00:00:00").getTime();
- var x = setInterval(function() {
- var now = new Date().getTime();
- var t = deadline - now;
- var days = Math.floor(t / (1000 * 60 * 60 * 24));
- var hours = Math.floor((t%(1000 * 60 * 60 * 24))/(1000 * 60 * 60));
- var minutes = Math.floor((t % (1000 * 60 * 60)) / (1000 * 60));
- var seconds = Math.floor((t % (1000 * 60)) / 1000);
- document.getElementById("wielkanoc").innerHTML = days + "dni "
- + hours + "godzin " + minutes + "minut " + seconds + "sekund ";
- if (t < 0) {
- clearInterval(x);
- document.getElementById("wielkanoc").innerHTML = "EXPIRED";
- }
- }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement