SHARE
TWEET

Untitled

a guest Mar 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.  
  3.       // Set desired date for countdown
  4.       var tokyo = new Date("Jul 24, 2020 21:00:00").getTime();
  5.  
  6.       // Get current date
  7.       var currenttime = new Date().getTime();
  8.  
  9.       // Get time between tokyo and currenttime
  10.       var distance = tokyo - currenttime;
  11.  
  12.       // Time calculations for days, hours, minutes and seconds
  13.       var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  14.       var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  15.       var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  16.       var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  17.  
  18.       alert("tokyo 2020:" days + "d " + hours + "h " + minutes + "m " + seconds + "s ");
  19.  
  20.  
  21.       </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top