This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author karlcow
Recipients belopolsky, eric.smith, karlcow, p-ganssle, zhanying
Date 2020-07-28.11:27:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595935654.15.0.373775044195.issue40236@roundup.psfhosted.org>
In-reply-to
Content
Also this.

>>> import datetime
>>> d0 = datetime.datetime.strptime("2024-0-3 00:00:00", "%Y-%W-%w %H:%M:%S")
>>> d0.strftime("%Y-%W-%w %H:%M:%S")
'2024-01-3 00:00:00'
>>> d1 = datetime.datetime.strptime("2024-1-3 00:00:00", "%Y-%W-%w %H:%M:%S")
>>> d1.strftime("%Y-%W-%w %H:%M:%S")
'2024-01-3 00:00:00'
>>> d2301 = datetime.datetime.strptime("2023-0-1 00:00:00", "%Y-%W-%w %H:%M:%S")
>>> d2311 = datetime.datetime.strptime("2023-1-1 00:00:00", "%Y-%W-%w %H:%M:%S")
>>> d2301
datetime.datetime(2022, 12, 26, 0, 0)
>>> d2311
datetime.datetime(2023, 1, 2, 0, 0)
>>> d2311.strftime("%Y-%W-%w %H:%M:%S")
'2023-01-1 00:00:00'
>>> d2301.strftime("%Y-%W-%w %H:%M:%S")
'2022-52-1 00:00:00'


Week 0 2023 became Week 52 2022 (which is correct but might lead to surprises)
History
Date User Action Args
2020-07-28 11:27:34karlcowsetrecipients: + karlcow, belopolsky, eric.smith, p-ganssle, zhanying
2020-07-28 11:27:34karlcowsetmessageid: <1595935654.15.0.373775044195.issue40236@roundup.psfhosted.org>
2020-07-28 11:27:34karlcowlinkissue40236 messages
2020-07-28 11:27:34karlcowcreate