Creating date with numbers (new Date(2012, 03, ...) gives wrong month (+1)
<p>When creating a <code>new Date</code> object using numbers for the parts, the value I get back is exactly <strong>one month</strong> ahead of the value I put in for 'month'.  </p>

<pre><code>new Date(2012, 05, 17, 00, 00, 00)
Sun Jun 17 2012 00:00:00 GMT+0800 (HKT)  // june?!
</code></pre>

<p>However, a normal parse of exactly the same string returns the correct time:</p>

<pre><code>new Date("2012-05-17 00:00:00")
Thu May 17 2012 00:00:00 GMT+0800 (HKT)
</code></pre>

<p>I get the same result in ie/ff/chrome.  Removing hours/min/seconds doesn't have any effect. I can work around it by subtracting one before setting the month, but instead I just switched to writing out my date as a string.</p>

<p><strong>Edit:</strong>
<em>The string parse doesn't work in IE.  I have no idea what I did, but I swear I made that work.  Thats prob. why I avoided it in the first place.  I've switched to using moment.js for now.</em></p>

<p>Ah, now I get it.  Just like regular java dates, which I don't code in except rarely, and even then always with a library (joda, etc).  What a terrible idea anyway.  Here is skeets take on the question: <a href="http://stackoverflow.com/questions/344380/why-is-january-month-0-in-java-calendar">Why is January month 0 in Java Calendar?</a></p>

<p>Why is this happening? </p>
