jquery-timeago
jquery-timeago copied to clipboard
:clock8: The original jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago").
Just added a simple callback function to be able to modify the time element on refresh. I use it to be able to style the date depending on the time....
Hello, I just added an interval id to the self object that is returned by the timeago() method. Convenient, if you want to manually stop the interval started. Ben
Not sure if you want to pull this into the master or not, but I thought I should let you decide. Thanks for the original, it rocks!
I added this because I wanted to display the original date if it was more than 1 day old. Also I wanted to extract the hours and minutes of the...
Allowing `jQuery.timeago.settings.strings.numbers` to be a callback function and adding optional `jQuery.timeago.settings.strings.formatter` callback, which can be used as a general post processing callback instead of the default `$.trim([prefix, words, suffix].join(" "))`....
livequery extends selectors to find elements "even after the page has been loaded and the DOM updated". This patch extends timeago to be used in conjunction with livequery. The changes...
Currently, every time an element is passed into the $.fn.timeago() method that element is included in the setInterval, regardless of whether or not it has already been included in a...
function substitute(stringOrFunction, number) { var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction; var value = ($l.numbers && $l.numbers[number]) || number; return string.replace(/%d/i, value); }
More locale support would be great. Example: I can't find hi / Hindi Native speakers: 260 million (2001)
It makes more sense to use setTimeout instead of setInterval. If this is done, the function can determine when the text is actually going to change and not waste calls...