Re: strptime format string nasty default

2012-05-09 Thread MRAB
On 09/05/2012 20:38, Javier Novoa C. wrote: Hi, I am using time.strptime method as follows: I receive an input string, representing some date in the following format: %d%m%Y However, the day part may be a single digit or two, depending on magnitude. For example: '10052012' will be parsed as

Re: strptime format string nasty default

2012-05-09 Thread Javier Novoa C.
On 2012-05-09, Jorgen Grahn wrote: > > You'd have to read the strptime(3) manual page (it's a Unix function, > imported straight into Python, I'm sure). Judging from a quick read > it's not intended to support things like these. I'm surprised it > doesn't parse your last example to (10, 52, 12) an

Re: strptime format string nasty default

2012-05-09 Thread Jorgen Grahn
On Wed, 2012-05-09, Javier Novoa C. wrote: > Hi, > > I am using time.strptime method as follows: > > I receive an input string, representing some date in the following > format: > > %d%m%Y > > However, the day part may be a single digit or two, depending on > magnitude. > > For example: > > '100520

Re: strptime format string nasty default

2012-05-09 Thread Garrett Cooper
On May 9, 2012, at 12:38 PM, "Javier Novoa C." wrote: > Hi, > > I am using time.strptime method as follows: > > I receive an input string, representing some date in the following > format: > > %d%m%Y > > However, the day part may be a single digit or two, depending on > magnitude. > > For e

strptime format string nasty default

2012-05-09 Thread Javier Novoa C.
Hi, I am using time.strptime method as follows: I receive an input string, representing some date in the following format: %d%m%Y However, the day part may be a single digit or two, depending on magnitude. For example: '10052012' will be parsed as day 10, month 5, year 2012 Again: '8052012'