JavaScript setFullYear() Method Returning an incorrect date
<p>This morning I noticed a peculiar issue with the JavaScript setFullYear method.</p>

<p>When using the method like so:</p>

<pre><code>d.setFullYear(2012,2,8);
</code></pre>

<p>The correct value is returned:</p>

<pre><code>Thu Mar 08 2012 10:30:04 GMT+0000 (GMT Standard Time)
</code></pre>

<p>However if I use the parseInt method to return the integers, the date returned is incorrect:</p>

<pre><code>d.setFullYear(parseInt("2012"), parseInt("02"), parseInt("08"));
</code></pre>

<p>returns:</p>

<pre><code>Wed Feb 29 2012 10:31:30 GMT+0000 (GMT Standard Time)
</code></pre>

<p>It appears that the parseInt method is returning the incorrect values, but when I test it:  </p>

<p><code>document.write(parseInt("2"));</code>  </p>

<p>Then the correct value is returned (2)</p>

<p>A working fiddle is here: <a href="http://jsfiddle.net/rXByJ/" rel="nofollow">http://jsfiddle.net/rXByJ/</a></p>

<p>Does the problem lie with parseInt or with setFullYear?</p>
