karl <karl+pythonb...@la-grange.net> added the comment:
Same on macOS 10.15.6 (19G73) Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.strptime("2024-0-3 00:00:00", "%Y-%W-%w %H:%M:%S") datetime.datetime(2024, 1, 3, 0, 0) >>> datetime.datetime.strptime("2024-1-3 00:00:00", "%Y-%W-%w %H:%M:%S") datetime.datetime(2024, 1, 3, 0, 0) Also https://pubs.opengroup.org/onlinepubs/007908799/xsh/strptime.html note that iso8601 doesn't have this issue. %V - ISO 8601 week of the year as a decimal number [01, 53]. https://en.wikipedia.org/wiki/ISO_week_date ---------- nosy: +karlcow _______________________________________ 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