Relative date function

Jehiah has a function called getRelativeTime() that will make it really easy to do relative date printing, such as “4 days ago” or “in 2 days.”

3 Responses to “Relative date function”

  1. antrix Says:

    I prefer the timesince method that ships with Django.

  2. import this. » Blog Archive » Spatial proximity searching Says:

    [...] Jehiah (of relative date function fame) now has some information about spatial proximity searching: This article covers how to search a database via latitude and longitude to find matches based on spatial proximity (or distance). This code is for mysql (also some in python), but it should be easily adaptable to other languages. [...]

  3. John Says:

    Antrix:

    Good tip! Thanks.

Leave a Reply