title: Format javascript current date and time
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/85116/how-do-i-display-a-date-time-in-the-users-locale-format-and-time-offset">How do I display a date/time in the user&#39;s locale format and time offset?</a>  </p>
  </blockquote>
  
  
  
  <p>Hi - simple question - I just want to take this:</p>
  
  <pre><code>document.getElementById("time").innerHTML= new Date();
  </code></pre>
  
  <p>and format it into something legible, like this:</p>
  
  <pre><code>May 18, 2011 7:45 AM
  </code></pre>
  
  <p>making sure it is localized to whomever might be seeing it. Currently, it prints out as this:</p>
  
  <pre><code>Wed May 18 2011 07:46:25 GMT-0400 (EDT)
  </code></pre>
  
  <p>How do I do this?</p>