I was recently working on a project where the client wanted “time ago” date stamps, such as Posted 23 minutes ago or Posted 1 week ago. For that project, we used the very nice jQuery Timeago script which automatically formats any date/time in a properly formatted tag to a timeago, kind of like this:
[html]<abbr title="July 17, 2008"><em><abbr title="time ago">2 years ago</abbr></em></abbr>[/html]
However, WordPress has a built-in function that will do the same thing: human_time_diff(). If you paste this code snippet into the loop, you’ll get a timeago date.
[php]Posted <?php echo human_time_diff(get_the_time(‘U’), current_time(‘timestamp’)) . ‘ ago’; ?>[/php]