converting ISO8601 date and time string representations to datetime

Roy Smith roy at panix.com
Thu Jul 31 09:13:14 EDT 2014


On Jul 31, 2014, at 8:59 AM, Skip Montanaro wrote:

> On Thu, Jul 31, 2014 at 6:52 AM, Roy Smith <roy at panix.com> wrote:
>> Sadly, the stdlib datetime really doesn't make life easy for dealing
>> with ISO-8601.  Dateutil is the classic answer, but it's slow.
> 
> A useful feature for dateutil would be a "sniff" function which, given
> a date string that dateutil.parser.parse can handle, instead returns a
> format string suitable for use with time.strptime.

+0.8.  But, even more than that, dateutil should come with a library of strings for common formats, and a built-in function to parse 8601.  It is, after all, the international standard.


--
Roy Smith
roy at panix.com




More information about the Python-list mailing list