Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

time_since()

I’ve changed the date heading for each post to display the relative time since the entry was posted, rather than absolute the date and time. My main reason for doing this is that it solves the timezone problem; all times on this site are in GMT, but the majority of the site’s visitors are likely to be in different timezones. Showing the time elapsed since the entry was posted serves everyone regardless of their location.

Rather than write my own function for this, I have reused the one written by my girlfriend for her own blog, which she launched a few days ago. She has described its workings in some detail in her most recent entry.

This is time_since() by Simon Willison, posted on 14th June 2003.

View blog reactions

Next: Course management systems

Previous: Small design tweak, big difference

2 comments

  1. Maybe it is also useful for the blogroll?

    Martijn - 17th June 2003 15:11 - #

  2. I've adapted the script in Spanish (sintaxis reasons). Is just 2 more lines ;) Check it out at http://www.andufo.net/2005/08/19/wordpress-timesin ce/

    Andres Santos - 20th August 2005 17:13 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2003/06/14/timeSince

A django site