Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
docs say:
%YYear with century as a decimal number.0001, 0002, …, 2013, 2014, …, 9998, 9999but this is what is happening
fromdatetimeimportdatetimeprint(datetime(9,6,7).strftime("%Y-%m-%d"))# 9-06-07print(datetime(99,6,7).strftime("%Y-%m-%d"))# 99-06-07print(datetime(999,6,7).strftime("%Y-%m-%d"))# 999-06-07
CPython versions tested on:
3.10
Operating systems tested on:
No response
Linked PRs
- gh-120713: normalize year with century for datetime.strftime #120820
- [3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) #121144
- [3.12] gh-120713: Normalize year with century for datetime.strftime (GH-120820) #121145
- [3.13] Revert "[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121144)" #122408
- [3.12] Revert "[3.12] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121145)" #122409
- gh-120713: Make _Py_NORMALIZE_CENTURY private #135933
- [3.14] gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933) #136387
Metadata
Metadata
Assignees
Projects
Status
Done