title: Why isn't "2016-02-16" equal to "2016-02-16 00:00"?
body: <p>I'm trying to pass both date strings to <code>new Date(t)</code>.</p>
  
  <p>I expect both strings represent the same time, after all, if I omit the time, shouldn't it be midnight of that day?</p>
  
  <p>But while,</p>
  
  <pre><code>new Date("2016-02-16 00:00")
  </code></pre>
  
  <p>returns 2016-02-16, midnight, local time as expected,</p>
  
  <pre><code>new Date("2016-02-16")
  </code></pre>
  
  <p>returns 2016-02-16, midnight UTC, which is wrong, or at least not what I expected given what the other string parses as.</p>
  
  <p>I would understand it if they would both have the same behavior, whether it is to return the time as local time, or as UTC, but it seems very inconsistent why they return different things like this.</p>
  
  <p>As a workaround, whenever I encounter a date that has no corresponding timestamp I can append " 00:00" to get consistent behavior, but it seems like this is rather fragile.</p>
  
  <p>I am getting this value from an INPUT element, of type 'datetime-local' so it seems especially inconsistent that I have to work around a value returned by a page element.</p>
  
  <p>Am I doing something wrong, or should I be doing something differently?</p>