I want to find out the following: given a date (datetime object), what is the corresponding day of the week?
datetime
For instance, Sunday is the first day, Mond
If you'd like to have the date in English:
from datetime import date import calendar my_date = date.today() calendar.day_name[my_date.weekday()] #'Wednesday'