Find day of week from month and year

tryit joseph.steffl at medtronic.com
Wed Sep 14 19:12:24 CEST 2005


>>> import calendar
>>> [y[4] for y in calendar.monthcalendar(2005, 9) if y[4]!=0][2]
16
>>> [y[4] for y in calendar.monthcalendar(2003, 6) if y[4]!=0][2]
20
>>> [y[4] for y in calendar.monthcalendar(2006, 2) if y[4]!=0][2]
17




More information about the Python-list mailing list