I'm meaning to format dates on my social web app much like Digg.com and other sites do. There, you see very friendly dates, such as:
- just now
- 3 minutes ago
- one hour ago
- 2 weeks ago
- 6 monts ago
...you get the idea. Before I wrap my head around creating such a thing, does anyone know of any ready-to-go script for this where I simply insert a datestamp and a friendly date text is given based on how it related to the current time?
PS: I need this in PHP, but pseudo-code or any other language is fine too.