Sha256: 34af7405f201df2e950488e95cfcf1996d94e0923b571dcab5d32d88421590b5
Contents?: true
Size: 536 Bytes
Versions: 93
Compression:
Stored size: 536 Bytes
Contents
exports.init = function(){ // // this implements lib/moment.js // // look up timeago timestamp's and process them // to nice and readable strings // (e.g.: 2 minutes ago) $('.timeago').each(function(index){ // get date-time var date_utc_format = $(this).text().substr(0,$(this).text().length-4); var date_formatted = moment.utc(date_utc_format); // adjust to local time var result = date_formatted.local(); // write result into selector text() $(this).text(result.fromNow()); }); };
Version data entries
93 entries across 93 versions & 1 rubygems