如何显示帖子更新时间像Facebook和Twitter? [英] How to show post update time like facebook and twitter?
本文介绍了如何显示帖子更新时间像Facebook和Twitter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在制作通知卡片。而不是显示通知的时间。我想显示自通知到达以来经过的时间。
I am making a notification deck. and rather than displaying the time at which a notification came. I want to show the time passed since the arrival of notification. As it happens in twitter and facebook where they show 32m, 1 hour ago etc.
我想实现这个代码是JavaScript / Java。
I want to implement this code is JavaScript/Java.
任何帮助将非常感激。
推荐答案
查看PrettyDate插件jQuery ,John Resig自己
Check out PrettyDate plugin of jQuery,by John Resig himself
http://ejohn.org / blog / javascript-pretty-date /
这篇关于如何显示帖子更新时间像Facebook和Twitter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文