SHARE
TWEET

Untitled

a guest May 1st, 2016 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ../../../../../../bower_components/jquery/dist/jquery.min.js
  2. ../../../../../../bower_components/bootstrap/dist/js/bootstrap.min.js
  3. ../../../../../../bower_components/jquery-colorbox/jquery.colorbox-min.js
  4. ../../../../../../bower_components/moment/min/moment-with-locales.min.js
  5. function fancydates(fanciness, date_format) {
  6.     if (fanciness == 0) {
  7.         return;
  8.     }
  9.  
  10.     dates = $('time.published.dt-published');
  11.  
  12.     i = 0;
  13.     l = dates.length;
  14.  
  15.     for (i = 0; i < l; i++) {
  16.         d = moment(dates[i].attributes.datetime.value);
  17.         if (fanciness == 1) {
  18.             o = d.local().format(date_format);
  19.         } else {
  20.             o = d.fromNow();
  21.         }
  22.         dates[i].innerHTML = o;
  23.     }
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top