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?
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?
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Apr 10, 2010 at 16:17 Gandalf StormCrowGandalf StormCrow 26.2k70 gold badges179 silver badges268 bronze badges2 Answers
Reset to default 22http://timeago.yarp.com/
This is a great jQuery plugin for it, and it explains the concept quite concisely.
Here's another fully-customizable alternative: https://github.com/layam/js_humanized_time_span