Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ../../../../../../bower_components/jquery/dist/jquery.min.js
- ../../../../../../bower_components/bootstrap/dist/js/bootstrap.min.js
- ../../../../../../bower_components/jquery-colorbox/jquery.colorbox-min.js
- ../../../../../../bower_components/moment/min/moment-with-locales.min.js
- function fancydates(fanciness, date_format) {
- if (fanciness == 0) {
- return;
- }
- dates = $('time.published.dt-published');
- i = 0;
- l = dates.length;
- for (i = 0; i < l; i++) {
- d = moment(dates[i].attributes.datetime.value);
- if (fanciness == 1) {
- o = d.local().format(date_format);
- } else {
- o = d.fromNow();
- }
- dates[i].innerHTML = o;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement