Finding out the weekday

Anna revanna at mn.rr.com
Wed Mar 26 05:16:26 CET 2003


posted and mailed

On Tue, 25 Mar 2003 21:05:08 +0000, Jorge Godoy wrote:

> "Mark McEahern" <marklists at mceahern.com> 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.

I'm curious what you're doing with date calculations. It's kindof a hobby
of mine. <Okay, I know that's kinda wierd> 

Anyways, if you're willing, I'd appreciate hearing what you're doing with
it.

cordially,
Anna




More information about the Python-list mailing list