Finding out the weekday

Jorge Godoy godoy at
Wed Mar 26 01:05:08 CET 2003

"Mark McEahern" <marklists at> writes:

> [Jorge Godoy]
>> Is there any Python module that given a particular date it returns me
>> the day of the week? I'm needing it for some special calculations
>> involving dates... 
>   import time
>   weekday = time.localtime()[6]
> As help(time) says, Monday is 0.

Thanks. I had found this before posting... I told in the other message
that the calendar module seems more suitable for what I'm needing. 

I appreciated a lot your answer.

Godoy.     <godoy at>

More information about the Python-list mailing list