]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140715: Add `%D` format code support to `strptime()` (GH-144819)
authorJason Yalim, PhD <4813268+jyalim@users.noreply.github.com>
Mon, 16 Feb 2026 22:20:37 +0000 (15:20 -0700)
committerGitHub <noreply@github.com>
Mon, 16 Feb 2026 22:20:37 +0000 (14:20 -0800)
commit185a6e942af3e44b3bdb2bdcf2d55c0a6208f89b
treee8e26ebff4ff1c91e72d3a6a199f447686804c1f
parent1797508ead02935ca7da859221247f4a7168cebd
gh-140715: Add `%D` format code support to `strptime()` (GH-144819)

* %D support for strptime, including test and Doc update
* additional %D test
* change documentation example date for %D so it is more legible to non-US readers
* change testing date for %D so it is more legible to non-US readers
* mv News blurb to Library, consistent with previous %F change
* change invalid format code from %D to C-standard unused %!
* Fix erroneous and misleading example Doc to %y from %Y, use correct C99+ definition for C99 %D; update additional tests

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Doc/library/datetime.rst
Lib/_strptime.py
Lib/test/datetimetester.py
Lib/test/test_strptime.py
Lib/test/test_time.py
Misc/NEWS.d/next/Library/2026-02-14-14-56-44.gh-issue-140715.AbSheM.rst [new file with mode: 0644]