title: Get date ISO string without time in javascript
body: <p>Is there a way to obtain a ISO string of a new date type in javascript with time at midnight without rebuilding a new date with date parts nor formatting it? </p>
  
  <p>I've been trying <a href="https://www.w3schools.com/code/tryit.asp?filename=FETRI3T5X7I0" rel="noreferrer">this</a> </p>
  
  <pre><code>var date = new Date();
  date.setHours(0, 0, 0, 0);
  document.write(date.toISOString());
  </code></pre>
  
  <p>and I am getting this</p>
  
  <pre><code>2017-04-20T04:00:00.000Z
  </code></pre>
  
  <p>I want to get this</p>
  
  <pre><code>2017-04-20T00:00:00.000Z
  </code></pre>
  
  <p>Is there a built-in function or way as I 've been trying to do to get the desired output (with rebuilding a date object with the date parts)?</p>