Many sites like http://facebook.com, http://twitter.com have timestamps but rather than saying the time, it says (x) minutes ago, (x) hours ago, (x) days ago, (x) weeks ago, (x) months ago, etc.
How can you do this in PHP?
Many sites like http://facebook.com, http://twitter.com have timestamps but rather than saying the time, it says (x) minutes ago, (x) hours ago, (x) days ago, (x) weeks ago, (x) months ago, etc.
How can you do this in PHP?
It's called "fuzzy time" usually, and I generally have rolled my own function depending on the granularity I've needed. Here's a good place to start: Converting PHP Fuzzy time to Javascript?