Paul Ganssle <[email protected]> added the comment:
I think this is not a bug. bpo-35535 is probably also intended behavior, but
that is less certain.
The misunderstanding here is that %W does not give you the ISO week number,
from the documentation:
%W: Week number of the year (Monday as the first day of the week) as a
decimal number.
All days in a new year preceding the first Monday are considered to be
in week 0.
If you want the ISO week number, I think you need %V, which *is* the ISO week:
>>> datetime(2018, 12, 31).strftime("%V %W")
'01 53'
I believe this ticket can be closed.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35841>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com