On Facebook the timestamps update themselves. If you post something, the timestamp will say, “a few seconds ago”. If you keep the page open an wait a minute it will change to say, “one minute ago”.
I suppose that the time objects on the page are rendering themselves every few seconds. Is there a JavaScript library that can do computations on datetime objects and produce these strings? In Python there is the datetime module and python-dateutil. Because this is client side code, how do you address templating and i18n?
timeago, a jQuery plugin