title: Dynamic date and time with moment.js and setInterval
body: <p>I'm trying to find out how I can display dynamic date and time using <a href="http://momentjs.com" rel="noreferrer">moment.js</a>.</p>
  
  <p>Apparently I can't figure out to use setInterval properly.</p>
  
  <p>If possible I'd prefer not to use jQuery as moment.js dosn't need it.</p>
  
  <p>Here's what I have so far: <a href="http://jsfiddle.net/37fLF/2/" rel="noreferrer">http://jsfiddle.net/37fLF/2/</a>.</p>
  
  <pre><code>$(document).ready(function () {
      var datetime = $('#datetime'),
          date = moment(new Date()),
          update = function(){
              datetime.html(date.format('dddd, MMMM Do YYYY, h:mm:ss a'));
          };
      update();
      setInterval(update, 1000);
  });​
  </code></pre>