PHP - Relative date function (2 minutes ago, 3 days ago...)


/ Published in: PHP
Save to your folder(s)

Gets seconds and returns it like Facebook/Twitter style: "2 minutes ago", "9 hours ago", etc...
The script actually returns "1 minute", "17 days"... so that you can customize it: "3 seconds ago", "in 1 minute", "will take 4 days", etc.

URL: http://xaviesteve.com/category/web-design/php/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.