title: Use moment.js to insert date inside HTML5 <time> element
body: <p>I want to use moment.js to insert a backdated <code>RFC 3339</code> timestamp inside an HTML5 <code>&lt;time&gt;</code> tag, so it renders into the HTML this:</p>
  
  <p><code>&lt;time datetime="2016-01-14T13:22:11-08:00"&gt;Lorem Ipsum&lt;/time&gt;</code></p>
  
  <p>With moment.js, my .js is working correctly to generate the timestamp:</p>
  
  <p><code>document.getElementById('fourDaysEarlier').innerHTML = moment().subtract(4, 'days').format("YYYY-MM-DDTHH:mm:ssZ")</code></p>
  
  <p>which I can successfully write into the document with <code>innerHTML</code> like this:</p>
  
  <p><code>&lt;span id="fourDaysEarlier"&gt;&lt;/span&gt;</code></p>
  
  <p>But how do I insert the timestamp inside the <code>&lt;time&gt;</code> tag, like this??</p>
  
  <p><code>&lt;time datetime="wantToInsertTimeStampHere"&gt;Lorem Ipsum&lt;/time&gt;</code></p>
  
  <p>thanks in advance!</p>