Compare years and month with jQuery
<pre><code>var onemonth = 3;
var oneyear = 2005;
var twomonth = 10;
var twoyear = 2000;
</code></pre>

<p>How can i split this and compare?
In this example is:</p>

<pre><code>var firstdate = onemonth + oneyear;
var seconddate = twomonth + twoyear;

if(firstdate &lt; seconddate){
 alert('error');
}
</code></pre>

<p>How is the best method for compare two date if i have only month and year?</p>

<p>LIVE: <a href="http://jsfiddle.net/26zms/" rel="nofollow">http://jsfiddle.net/26zms/</a></p>
