title: How to Parse string into Date in angularjs
body: <p>I have data from the server to display. I receive strings such as this: <code>2016-05-01</code>. I need to filter the data between two dates in that format. I have a function to parse the date as it is:</p>
  
  <pre><code>$scope.parseDate = function (date) {
    return new Date(Date.parse(date));
  } 
  </code></pre>
  
  <p>In my html I display the date with this:</p>
  
  <pre><code>{{ parseDate(item.startDate) }}`
  </code></pre>
  
  <p>But in the browser, the result is: <code>"2016-07-12T00:00:00.000Z"</code>.</p>
  
  <ol>
  <li><p>I need the parse the string into the same format as from the server: 2016-05-01.</p></li>
  <li><p>I need a simple filter function.</p></li>
  </ol>
  
  <p>I don't want to use <code>moment.js</code>. My backend platform is JavaScript.</p>