Converting a timestamp to a relative date/time (e.g., “2 minutes ago”) and continuously updating it with Javascript

后端 未结 2 559
清酒与你
清酒与你 2021-02-09 07:29

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 H

2条回答
  •  广开言路
    2021-02-09 07:55

    http://timeago.yarp.com/

    This is a great jQuery plugin for it, and it explains the concept quite concisely.

提交回复
热议问题