No strptime in Windows?

David C. Ullrich ullrich at math.okstate.edu
Tue Jun 13 10:50:01 EDT 2000


Thomas Wouters <thomas at xs4all.net> wrote in article
<20000610215351.L20700 at xs4all.nl>...
> On Sat, Jun 10, 2000 at 07:28:56PM +0000, david_ullrich at my-deja.com
wrote:
> 
[...] 
> A replacement strptime() (probably based on the glibc sources)
> has been fairly high on my wishlist, but fairly low on my TODO ;) I'm
sure
> it's quite a big and complicated piece of code :P

	It's actually not so hard (how-you-say, :P), just a little tedious,
because you need to know a few details about lengths of months
and so on to, eg, determine that Feb 1 2000 is the 32-nd day of
the year.

> >     Also: Is Monday really day 0? I woulda thought
[...]
> 
> The strptime manpage on Linux says this:
> 
>               %w     weekday number  (0-6)  with  Sunday  as  the
>                      first day of the week

	Seems like this maybe less relevant than it appears at first,
since for example the docs specify that the month is 1-12 in
the Python time module although it's 0-11 in C.

	It does appear that Monday is 0; I bet this is the same
in Python under Linux, in spite of what the Linux docs say.

> But perhaps this is different on Windows ? :-)

	I bet not.

> Thomas Wouters <thomas at xs4all.net>
> 
> Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
> 
> 



More information about the Python-list mailing list