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.


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.