title: embed moment.js formatting in handlebars templates
body: <p>I am trying get Moment.js date-time formating as part of my handlebars template.</p>
  
  <p><strong>Actual Sample:</strong></p>
  
  <pre><code>&lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"&gt;
      &lt;div id="hb-content"&gt;&lt;/div&gt;
  
      &lt;script id="hb-template" type="text/x-handlebars-template"&gt;
          &lt;small&gt;Last restarted:&lt;/small&gt;
          &lt;code&gt;moment({{last_started}}).format('dddd, MMMM Do');&lt;/code&gt;
          &lt;code&gt;moment({{last_started}}).format('h:mma');&lt;/code&gt;
      &lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
          var temp = document.getElementById("hb-template").innerHTML;
          var template = Handlebars.compile(temp);
          var html = template({
              last_started: "/Date(1463152740000)/"
          })
  
          document.getElementById('hb-content').innerHTML = html;
      &lt;/script&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <blockquote>
    <p>Last restarted: moment(/Date(1463152740000)/).format('dddd, MMMM Do');
    moment(/Date(1463152740000)/).format('h:mma');</p>
  </blockquote>
  
  <p><strong>Expected Output:</strong></p>
  
  <blockquote>
    <p>Last restarted: Friday, May 13th 9:15pm</p>
  </blockquote>