How to compare two dates in JQuery?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/492994/compare-2-dates-with-javascript">Compare 2 dates with JavaScript</a><br>
  <a href="http://stackoverflow.com/questions/1657733/compare-two-dates-in-javascript">Compare two dates in JavaScript</a>  </p>
</blockquote>



<p>I am new to jQuery and I want to compare two dates,</p>

<p>e.g. <code>var date1 = '2011-01-12';
      var date2 = '2011-01-15';</code></p>

<p>I tried but could't find a solution. </p>
