title: How do i find the difference between two dates using Javascript
body: <p>I want to get reaming days to go particular date so i am trying to detection of particular date with today date. but this not working here is my <a href="http://jsfiddle.net/sureshpattu/sJueG/" rel="nofollow">code</a>   If the date is next month 27 how can i get remaining days to go</p>
  
  <pre><code>    var date2=new Date();
      var date1=27/5/2012;
      var diff = date1.getDate()-date2.getDate();
      var date_reaming = diff.getDate();
      document.write(date_reaming + 'days to go');
  </code></pre>