title: new Date with setDate gives NaN
body: <p>Why does this <code>new Date().setDate(12)</code> returns <code>1510501854723</code> ?</p>
  
  <p>I'm trying to get first day of the week like that </p>
  
  <pre><code>new Date(daterefStart.setDate(daterefStart.getDate() - daterefStart.getDay())).getDate();
  </code></pre>
  
  <p>Where <code>daterefStart</code> lets say is today. <code>daterefStart.getDate() - daterefStart.getDay()</code> returns <code>12</code> which when <code>setDate</code> is called it returns weird numbers.</p>
  
  <p>When i first initialize my calendar widget i use exact same function to get the first day of the week and it <strong>works</strong>. What's wrong?</p>