Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #28670

Re: Parsing ISO date/time strings - where did the parser go?

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'output': 0.04; 'python': 0.09; 'objects.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; '2.7:': 0.16; 'formats.': 0.16; 'parser.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:ISO': 0.16; 'subject:parser': 0.16; 'subject:where': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'input': 0.18; 'parse': 0.22; 'example': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.28; 'subject:/': 0.28; 'url:python': 0.32; 'to:addr:python-list': 0.33; 'skip:d 20': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'method': 0.36; 'quite': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'john': 0.60; 'dead': 0.62; 'thomas': 0.62; 'received:fios.verizon.net': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Parsing ISO date/time strings - where did the parser go?
Date Thu, 06 Sep 2012 22:12:35 -0400
References <k2atej$4rq$1@dont-email.me> <5048FD0D.1020400@jollybox.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0
In-Reply-To <5048FD0D.1020400@jollybox.de>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.348.1346983987.27098.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1346983987 news.xs4all.nl 6936 [2001:888:2000:d::a6]:40943
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:28670

Show key headers only | View raw


On 9/6/2012 3:44 PM, Thomas Jollans wrote:
> On 09/06/2012 09:27 PM, John Nagle wrote:
>> In Python 2.7:
>>
>>     I want to parse standard ISO date/time strings such as
>>
>> 	2012-09-09T18:00:00-07:00
>>
>> into Python "datetime" objects.  The "datetime" object offers
>> an output method , datetimeobj.isoformat(), but not an input
>> parser.  There ought to be
>>
>> 	classmethod datetime.fromisoformat(s)
>
> http://docs.python.org/library/datetime.html#datetime.datetime.strptime
>
> The ISO date/time format is dead simple and well-defined. strptime is
> quite suitable.

I do not see any example formats. An example for ISO might be a good one.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Parsing ISO date/time strings - where did the parser go? John Nagle <nagle@animats.com> - 2012-09-06 12:27 -0700
  Re: Parsing ISO date/time strings - where did the parser go? Paul Rubin <no.email@nospam.invalid> - 2012-09-06 12:51 -0700
    Re: Parsing ISO date/time strings - where did the parser go? John Nagle <nagle@animats.com> - 2012-09-06 13:34 -0700
      Re: Parsing ISO date/time strings - where did the parser go? Miki Tebeka <miki.tebeka@gmail.com> - 2012-09-06 16:27 -0700
      Re: Parsing ISO date/time strings - where did the parser go? John Gleeson <jdgleeson@mac.com> - 2012-09-08 18:20 -0600
        Re: Parsing ISO date/time strings - where did the parser go? John Nagle <nagle@animats.com> - 2012-09-08 20:51 -0700
          Re: Parsing ISO date/time strings - where did the parser go? Roy Smith <roy@panix.com> - 2012-09-09 06:15 -0400
            Re: Parsing ISO date/time strings - where did the parser go? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-09 12:20 +0100
  Re: Parsing ISO date/time strings - where did the parser go? Thomas Jollans <t@jollybox.de> - 2012-09-06 21:44 +0200
    Re: Parsing ISO date/time strings - where did the parser go? Roy Smith <roy@panix.com> - 2012-09-09 08:14 -0400
      Re: Parsing ISO date/time strings - where did the parser go? "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2012-09-10 22:46 +0100
        Re: Parsing ISO date/time strings - where did the parser go? Chris Angelico <rosuav@gmail.com> - 2012-09-11 08:51 +1000
          Re: Parsing ISO date/time strings - where did the parser go? Roy Smith <roy@panix.com> - 2012-09-10 21:12 -0400
            Re: Parsing ISO date/time strings - where did the parser go? Ben Finney <ben+python@benfinney.id.au> - 2012-09-12 02:00 +1000
  Re: Parsing ISO date/time strings - where did the parser go? Dave Angel <d@davea.name> - 2012-09-06 15:54 -0400
    Re: Parsing ISO date/time strings - where did the parser go? Roy Smith <roy@panix.com> - 2012-09-06 19:44 -0400
      Re: Parsing ISO date/time strings - where did the parser go? André Malo <ndparker@gmail.com> - 2012-09-08 20:12 +0200
  Re: Parsing ISO date/time strings - where did the parser go? Roy Smith <roy@panix.com> - 2012-09-06 19:34 -0400
  Re: Parsing ISO date/time strings - where did the parser go? Terry Reedy <tjreedy@udel.edu> - 2012-09-06 22:12 -0400
  Re: Parsing ISO date/time strings - where did the parser go? Pete Forman <petef4+usenet@gmail.com> - 2012-09-12 13:31 +0100

csiph-web