21
In Python, showing the day of the week as an integer using datetime.strftime() shows a different result than using datetime.weekday().
>>> import datetime
>>> now = datetime.datetime.now()
>>> now.strftime('%A')
'Sunday'
>>> now.strftime('%w') # Day of the week as an integer.
'0'
>>> now.weekday() # Day of the week as an integer, a different way.
6
With strftime(), the string format %w has Sunday as the first day of the week. With weekday(), it's Monday instead.
What's the history of why these two are different?