title: Javascript Countdown shows NaN in IE and Firefox, works in Chrome
body: <p>I'm working on a site for a client where he needs a countdown timer to count down to 10pm two days from each site update. (or however many days he wishes to enter) The countdown functions perfectly in Google Chrome but in Internet Explorer and Firefox it shows NaN NaN. I've read this means "not a number" so is there something wrong with the way my code in calculating the date information? Any help would be appreciated! My code is below: </p>
  
  <pre><code>&lt;span id="countdown1" class="countdown"&gt;&lt;/span&gt;
       &lt;script language="javascript"&gt;
  
       // set the date we're counting down to 2 days from now at 10pm
  var target_date1 = Date.parse("2014-01-05 22:00:00:000");
  
  // variables for time units
  var days1, hours1, minutes1, seconds1;
  
  // get tag element
  var countdown1 = document.getElementById("countdown1");
  
  // update the tag with id "countdown" every 1 second
  setInterval(function () {
  
  // find the amount of "seconds" between now and target
  var current_date1 = new Date().getTime();
  var seconds_left1 = (target_date1 - current_date1) / 1000;
  
  // do some time calculations
  days1 = parseInt(seconds_left1 / 86400);
  seconds_left1 = seconds_left1 % 86400;
  
  hours1 = parseInt(seconds_left1 / 3600);
  seconds_left1 = seconds_left1 % 3600;
  
  minutes1 = parseInt(seconds_left1 / 60);
  seconds1 = parseInt(seconds_left1 % 60);
  
  // format countdown string + set tag value
  countdown1.innerHTML = days1 + " days, " + hours1 + " hours, "
  + minutes1 + " minutes, " + seconds1 + " seconds";  
  
  }, 1000);
  &lt;/script&gt;
  </code></pre>