Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as JavaScript by countdown ( 6 years ago )
const second = 1000,
minute = second * 60,
hour = minute * 60,
day = hour * 24;

let countDown = new Date('07 29 2020 15:10:00').getTime(),
x = setInterval(function () {

  let now = new Date().getTime(),
  distance = countDown - now;

  document.getElementById('days').innerText = Math.floor(distance / day),
  document.getElementById('hours').innerText = Math.floor(distance % day / hour),
  document.getElementById('minutes').innerText = Math.floor(distance % hour / minute),
  document.getElementById('seconds').innerText = Math.floor(distance % minute / second);

  //do something later when date is reached
  //if (distance < 0) {
  //  clearInterval(x);
  //  'IT'S MY BIRTHDAY!;
  //}

}, second);

 

Revise this Paste

Your Name: Code Language: