Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'url:bitbucket': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'seemed': 0.09; 'subject:string': 0.09; 'objects.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'roy': 0.16; 'wrote:': 0.18; 'trying': 0.19; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'right.': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'wonder': 0.29; "i'm": 0.30; '>>>>': 0.31; 'received:132': 0.31; 'url:python': 0.33; 'subject:time': 0.33; 'something': 0.35; 'convert': 0.35; 'dates': 0.36; 'representing': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'times': 0.62; 'smith': 0.68; 'article': 0.77 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Wolfgang Maier Subject: Re: converting ISO8601 date and time string representations to datetime Date: Fri, 01 Aug 2014 08:52:33 +0200 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: px1.ruf.uni-freiburg.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1406875903 news.xs4all.nl 2881 [2001:888:2000:d::a6]:41246 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3495 X-Received-Body-CRC: 4059803038 Xref: csiph.com comp.lang.python:75461 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 a regex. It must have been painstaking to get that right. >> https://bitbucket.org/micktwomey/pyiso8601/src/2bd28b5d6cd2481674a8b0c54a8bba6 >> 4ab775f81/iso8601/iso8601.py?at=default > > It is a thing of beauty. > No wonder I found it hard to write something that seemed bulletproof !