53
is correct because 2021-01-01
is in the 53rd week of 2020 by the ISO week date system. Week 53 runs from 2020-12-28 through 2021-01-03, inclusive.
2021
is incorrect. It is not the 53rd week of 2021, but rather the 53rd week of 2020.
The problem is that you are using %Y
for the year. When combined with the week number, you should instead be using %G
for the year. See the docs here.
Also, the ISO 8601 standard requires a W
before the week number to be fully compliant. Change your format to "%G-W%V"
and it will correctly produce "2020-W53"