title: JavaScript new Date() problems
body: <p>Reading a previous question about the <code>Date</code> object in JavaScript I pointed out on my notebook the following problem:</p>
  
  <pre><code>var date1 = new Date('2015','02','31');
  </code></pre>
  
  <p>The command: <code>alert(date1.getDay());</code> runs correctly!</p>
  
  <p>What happens on my computer with IE and Chrome?
  If I debug I see: </p>
  
  <blockquote>
    <p><code>__proto__</code> Invalid Date</p>
  </blockquote>
  
  <p>Why? I also write the command as:</p>
  
  <pre><code>var date1 = new Date(2015, 2, 10);
  </code></pre>
  
  <p>But the problem continues to be there.</p>
  
  <p>Many thanks for the help</p>