Re: converting ISO8601 date and time string representations to datetime

2014-08-11 Thread Mark Lawrence
On 06/08/2014 20:05, Skip Montanaro wrote: On Wed, Aug 6, 2014 at 1:31 PM, Joel Goldstick wrote: Among other features it lists this: Gaps in functionality: ISO-8601 parsing, timespans, humanization What is "humanization"? Skip Presumably as in https://pypi.python.org/pypi/humanize The pa

Re: converting ISO8601 date and time string representations to datetime

2014-08-11 Thread Mark Lawrence
On 31/07/2014 10:11, Wolfgang Maier wrote: Hi, I'm trying to convert ISO8601-compliant strings representing dates or dates and times into datetime.datetime objects. I tried using the strptime method, but the problem here is that I can only specify one format argument, which can be used to parse e

Re: converting ISO8601 date and time string representations to datetime

2014-08-06 Thread Skip Montanaro
On Wed, Aug 6, 2014 at 1:31 PM, Joel Goldstick wrote: > Among other features it lists this: Gaps in functionality: ISO-8601 > parsing, timespans, humanization What is "humanization"? Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: converting ISO8601 date and time string representations to datetime

2014-08-06 Thread Joel Goldstick
On Fri, Aug 1, 2014 at 10:53 PM, Akira Li <4kir4...@gmail.com> wrote: > Wolfgang Maier writes: > >> On 08/01/2014 01:30 AM, Roy Smith wrote: >>> In article , >>> Albert-Jan Roskam wrote: >>> > In article , > Wolfgang Maier wrote: > >> Hi, >> I'm trying to convert ISO8601-co

Re: converting ISO8601 date and time string representations to datetime

2014-08-01 Thread Akira Li
Wolfgang Maier writes: > On 08/01/2014 01:30 AM, Roy Smith wrote: >> In article , >> Albert-Jan Roskam wrote: >> In article , Wolfgang Maier wrote: > Hi, > I'm trying to convert ISO8601-compliant strings representing dates or > dates and times into datetime.datetime

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Wolfgang Maier
On 08/01/2014 01:30 AM, Roy Smith wrote: In article , Albert-Jan Roskam wrote: In article , Wolfgang Maier wrote: Hi, I'm trying to convert ISO8601-compliant strings representing dates or dates and times into datetime.datetime objects. https://pypi.python.org/pypi/iso8601 Yikes, what

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Roy Smith
In article , Albert-Jan Roskam wrote: > >In article , > > Wolfgang Maier wrote: > > > >> Hi, > >> I'm trying to convert ISO8601-compliant strings representing dates or > >> dates and times into datetime.datetime objects. > > > >https://pypi.python.org/pypi/iso8601 > > Yikes, what a regex. It

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Albert-Jan Roskam
>In article , > Wolfgang Maier wrote: > >> Hi, >> I'm trying to convert ISO8601-compliant strings representing dates or >> dates and times into datetime.datetime objects. > >https://pypi.python.org/pypi/iso8601 Yikes, what a regex. It must have been painstaking to get that right. https://bitb

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Albert-Jan Roskam
>In article , > Wolfgang Maier wrote: > >> Hi, >> I'm trying to convert ISO8601-compliant strings representing dates or >> dates and times into datetime.datetime objects. > >https://pypi.python.org/pypi/iso8601 Yikes, what a regex. It must have been painstaking to get that right. https://bitb

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Mark Lawrence
On 31/07/2014 10:11, Wolfgang Maier wrote: Hi, I'm trying to convert ISO8601-compliant strings representing dates or dates and times into datetime.datetime objects. I tried using the strptime method, but the problem here is that I can only specify one format argument, which can be used to parse e

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Wolfgang Maier
On 31.07.2014 15:13, Roy Smith wrote: On Jul 31, 2014, at 8:59 AM, Skip Montanaro wrote: On Thu, Jul 31, 2014 at 6:52 AM, Roy Smith 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

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Roy Smith
On Jul 31, 2014, at 8:59 AM, Skip Montanaro wrote: > On Thu, Jul 31, 2014 at 6:52 AM, Roy Smith 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" fu

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Skip Montanaro
On Thu, Jul 31, 2014 at 6:52 AM, Roy Smith 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

Re: converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Roy Smith
In article , Wolfgang Maier wrote: > Hi, > I'm trying to convert ISO8601-compliant strings representing dates or > dates and times into datetime.datetime objects. https://pypi.python.org/pypi/iso8601 or https://pypi.python.org/pypi/isodate There's also > I do know about the dateutil p

converting ISO8601 date and time string representations to datetime

2014-07-31 Thread Wolfgang Maier
Hi, I'm trying to convert ISO8601-compliant strings representing dates or dates and times into datetime.datetime objects. I tried using the strptime method, but the problem here is that I can only specify one format argument, which can be used to parse either a full date/time string or just a d