ISO to Gregorian, strptime madness

Peter Hansen peter at
Thu Dec 4 23:10:09 CET 2003

Afanasiy wrote:
> On Thu, 04 Dec 2003 10:43:38 -0500, Peter Hansen <peter at>
> wrote:
> >Afanasiy wrote:
> >>
> >> While I'm posting, how about this old dilemma... from the 2.3 modules.
> >> strptime exists in time, but not in datetime, while strftime exists in
> >> both.
> >
> >Uh, really?
> >
> >Looks to me like strptime and strftime are both in time and not in datetime.
> Yeah I didn't remember the specifics, but it's something like that.
> Something that I needed to have strptime does not have it, but has
> strftime. I am a sorry for that mistake now, because of your reply.
> This is not the primary concern of the post, and not even secondary,
> so please ignore the silly mistake and help with the other things.

I wish I could help, but I don't know anything about this area.  I was
just struck by the seeming irregularity, but upon investigating I didn't
see the same thing you did so I pointed it out.

(To be honest, I don't see the problem with a two-line solution, which
could easily be encapsulated in a simple function if it looks too
ugly for you.)


More information about the Python-list mailing list