Finding out the weekday

Mark McEahern marklists at
Tue Mar 25 20:50:45 CET 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