title: javascript date difference NaN
body: <p>In the following code i get the <code>course_diff_date</code> as NaN what am i doing wrong here, i want to get the difference in days</p>
  
  <pre><code>console.log(d1);
  //Thu Jan 01 1970 05:30:00 GMT+0530 (IST)
  var today = new Date(); 
  var course_time = new Date(d1);
  var new_date = new Date(today.getMonth()+ "/" +today.getDate()+ "/" +today.getFullYear());
  var server_date = new Date(course_time.getMonth()+ "/" +course_time.getDate()+ "/" +course_time.getFullYear());
  var timeDiff = Math.round(new_date.getTime() - server_date.getTime());
  var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));
  course_diff_date = diffDays + " Days";
  </code></pre>