Paul Ganssle <p.gans...@gmail.com> added the comment:

Likely relevant is bpo-23136, where they dealt with similar issues in the past.

I don't see any explicit test for this behavior, but it seems that the solution 
is to try to be consistent and to not raise a ValueError.

Looking at this issue, I think it's a manifestation of a similar bug that hits 
when a year starts with a Monday.

It seems like the behavior is that the following days (%W-%w) should be 
sequential in any year: 00-1, 00-2, 00-3, 00-4, 00-5, 00-6, 00-0, 01-1, 01-2, 
...

Since 2024 starts in a Monday, the first day of the year should be 2024-01-1, 
and the 2024-00-1 week should start 2023-12-25 rather than duplicating the 
following week.

I think there's an equivalent issue with dates of the form "%Y-%U-%w", but 
happening on years that start with a Sunday.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40236>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to