[Python-Dev] Re: datetime issues (original) (raw)
Gustavo Niemeyer niemeyer at conectiva.com
Mon Sep 15 12:50:26 EDT 2003
- Previous message: [Python-Dev] Re: datetime issues
- Next message: [Python-Dev] datetime issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>If Guido wanted to stay out of the relatively clear time zone >business, I can imagine his interest in trying to guess how to parse date >and time strings. Apart from Brett's strptime(), I believe the email >module >has some useful string->datetime code.
The PyXML package includes a parser (xml.utils.iso8601) for the date/time format most commonly used in XML applications. That and a parser for
Cool! Thanks for mentioning it!
RFC822 dates would meet the needs of many technical applications (though not ones where users can enter dates -- but that problem may be too complicated for the stdlib).
I do not agree. I've done a small research and there seems to be many nice generic implementations of these parsers, which would benefit technical applications and hand made dates (some of them below[1]), and it doesn't look that complex. I'll be working to provide trial implementation collecting the best features described in these papers in the near future.
Btw, the relativedelta is mostly ready. That's the first step to provide relative dates in the parser.
I'll happily convert the iso8601 module for addition to the standard library if date parsing is deemed a topic of interest.
I'm not yet sure if date parsing and other improvements in the date/time area is a topic of general interest, but at least I am interested. :-)
[1] http://www.egenix.com/files/python/mxDateTime.html http://ringmaster.arc.nasa.gov/tools/time_formats.html http://www.thinkage.ca/english/gcos/expl/b/lib/0tosec.html http://search.cpan.org/author/MUIR/Time-modules-2003.0211/lib/Time/ParseDate.pm
-- Gustavo Niemeyer http://niemeyer.net
- Previous message: [Python-Dev] Re: datetime issues
- Next message: [Python-Dev] datetime issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]