Friends, first of all I am new to javascript, and so please consider this question whether it comes under low priority too.
I need to show the created time of a post as 5 min ago, 1 hour ago, 1 day ago etc.. In hand the created time of the post is 2013-05-06T00:45:12.754Z . How can I convert the time as above.
try using timeago
Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (eg "4 minutes ago" or "about 1 day ago").
examples:
- You opened this page about a minute ago.
- This page was last modified 27 days ago.
- Ryan was born 34 years ago.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.