Check the dates in JavaScript
<p>I want to check two dates in java script. date format is YYYY-MM-dd.</p>

<pre><code>var date1 = 2011-9-2;
var date1 = 2011-17-06;
</code></pre>

<p>Can anybody say how can I write condition?</p>
