How to use Moment.js?
I'm unable to follow the Moment.js documentation , and need some help with setting it up. I've referenced the moment.min.js file properly on my webpage like so: <script src="/js/moment.min.js"></script> Coming to the HTML part of my webpage, I have two different datetime's on the same page: Published Date <time class="pubdate" datetime="2012-06-09T12:32:10-04:00" pubdate> June 09, 2012 </time> Last Modified Date <time class="updated" itemprop="dateModified" datetime="2012-06-09T12:32:10-04:00"> June 9, 2012 ~ 12:32 </time> Important! The relative date parsing shouldn't go beyond "yesterday".