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

后端 未结 2 557
清酒与你
清酒与你 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 08:12

    Here's another fully-customizable alternative: https://github.com/layam/js_humanized_time_span

提交回复
热议问题