I have some arbitrary-week times in the following format: "Monday 11:30am"
I would like to parse these into datetime.datetimes. I don't care what year/month/day I end up with in the object, but if the string says "Monday", then the resulting datetime.datetime should be a day that is a Monday.
Unfortunately, the %A formatter (day of week) seems to be ignored by strptime:
>>> import datetime
>>> a = "Monday 11:30am"
>>> b = "Tuesday 11:30am"
>>> dt_format = "%A %I:%M%p"
>>> datetime.datetime.strptime(a, dt_format)
datetime.datetime(1900, 1, 1, 11, 30)
>>> datetime.datetime.strptime(b, dt_format)
datetime.datetime(1900, 1, 1, 11, 30)
How do I correctly parse the day of the week?