Finding out the weekday

Mark McEahern marklists at mceahern.com
Tue Mar 25 14:50:45 EST 2003


[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.

// m
-






More information about the Python-list mailing list