1>>> import datetime
2>>> datetime.datetime.today()
3datetime.datetime(2012, 3, 23, 23, 24, 55, 173504)
4>>> datetime.datetime.today().weekday()
54
1from datetime import datetime
2date_str='10-12-20'
3datetime_object = datetime.strptime(date_str, '%m-%d-%y')
4datetime_object.weekday()
1import datetime
2from dateutil.relativedelta import relativedelta
3
4week = 25
5year = 2021
6date = datetime.date(year, 1, 1) + relativedelta(weeks=+week)
7print(date)
8