title: date() function returning Invalid Date in Safari and Firefox
body: <p>I am formatting a date in the following way:</p>
  
  <pre><code>date = new Date("2013-05-12 20:00:00");
  formattedDate = new Date(date.getFullYear(),date.getMonth(),date.getDate());
  </code></pre>
  
  <p>When I run this in Chrome it outputs:</p>
  
  <pre><code>Sun May 12 2013 00:00:00 GMT-0700 (PDT)
  </code></pre>
  
  <p>Which is what I need, however when I run this in Firefox or Safari I get</p>
  
  <pre><code>Invalid Date
  </code></pre>
  
  <p>Can any one suggest a workaround for this. Extra points if it doesn't require a library, regex or string manipulation.</p>