Intelligent Date & Time parsing
Mike Driscoll
kyosohma at gmail.com
Fri Mar 7 17:10:03 EST 2008
On Mar 7, 4:08 pm, shak... at gmail.com wrote:
> I'm new to python and I was wondering if there are any intelligent
> date/time parsing modules out there. I've looked at strptime (or
> whichever it is) and mxDateTime from the eGenix package. 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.
>
> So are there any modules that allow for that kind of parsing?
There's the dateutil module that's a fancy wrapper for the datetime
module. The author's site has lots of examples as well as the source:
http://labix.org/python-dateutil
I use it quite a bit.
HTH
Mike
More information about the Python-list
mailing list