How to create a friendly date format(for example “submitted 2 days ago”)

Possible Duplicate: How do I calculate relative time? I want 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 mi…




trilian synthic4te omnisphere keyscape groove3 explained