title: Why does the JS date act like this?
body: <p>I have an array called dateArr which contains: [2014, 07, 10];</p>
  
  <p>When I create a date out of it like below:</p>
  
  <pre><code>new Date(dateArr[0], Number(dateArr[1]), Number(dateArr[2]), 0, 0, 0);
  </code></pre>
  
  <p>It evaluates to '2014-08-09T23:00:00.000Z' in the console.
  I understand thats months are zero based, but why, to correct the time, do I have to do this:</p>
  
  <pre><code>new Date(dateArr[0], Number(dateArr[1]) - 1, Number(dateArr[2]), 1, 0, 0);
  </code></pre>
  
  <p>Which gives: 2014-07-10T00:00:00.000Z</p>
  
  <p>This doesn't seem right to me, could someone explain?</p>