title: How to check if date is within 30 days?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3224834/get-difference-between-2-dates-in-javascript">Get difference between 2 dates in javascript?</a>  </p>
  </blockquote>
  
  
  
  <p>I am storing date variables like this:</p>
  
  <pre><code>var startYear = 2011;
  var startMonth = 2;
  var startDay = 14;
  </code></pre>
  
  <p>Now I want to check if current day (today) is falling within 30 days of the start date or not.
  Can I do this?</p>
  
  <pre><code>var todayDate = new Date();
  var startDate = new Date(startYear, startMonth, startDay+1);
  var difference = todayDate - startDate;
  </code></pre>
  
  <p>????</p>
  
  <p>I am not sure if this is syntactically or logically correct.</p>