Reputation: 26212
Does anybody know how did Facebook do that "time ago". I'm trying to do the same with PHP/Javascript
I think it works something like PHP renders timestamp in HTML and then Javascript continuously calculate the time ago; does anybody know any more info about this?
Upvotes: 7
Views: 2139
Reputation: 1474
Here's another fully-customizable alternative: https://github.com/layam/js_humanized_time_span
Upvotes: 0
Reputation: 11546
This is a great jQuery plugin for it, and it explains the concept quite concisely.
Upvotes: 22