I want to find out the following:
given a date (datetime
object), what is the corresponding day of the week?
For instance, Sunday is the first day, Mond
Assuming you are given the day, month, and year, you could do:
import datetime
DayL = ['Mon','Tues','Wednes','Thurs','Fri','Satur','Sun']
date = DayL[datetime.date(year,month,day).weekday()] + 'day'
#Set day, month, year to your value
#Now, date is set as an actual day, not a number from 0 to 6.
print(date)