In Python, showing the day of the week as an integer using datetime.strftime() shows a different result than using datetime.weekday().
datetime.strftime()
datetime.weekday()
Maybe weekday is based on locale while strftime is not? Because I have different output:
weekday
strftime
In [14]: d.strftime("%A") Out[14]: 'Sunday' In [15]: d.strftime("%w") Out[15]: '0' In [16]: now.weekday() Out[16]: 0