Intelligent Date & Time parsing

Jeffrey Froman jeffrey at fro.man
Fri Mar 7 17:35:53 EST 2008


shakefu at gmail.com wrote:

> I need
> something to parse user input for a django app, and it's awesome to be
> able to write "last monday", "a year ago", or "10pm tuesday" like
> PHP's strtotime.

Django comes with some pretty handy filters for doing this sort of
formatting. Check out the "date", "now", "timesince" and "timeuntil"
filters here:

http://www.djangoproject.com/documentation/templates/#built-in-filter-reference


Jeffrey



More information about the Python-list mailing list