Skip to content

gh-140715: Add %D format code support to strptime()#144819

Open
jyalim wants to merge 11 commits intopython:mainfrom
jyalim:fix-issue-140715--D
Open

gh-140715: Add %D format code support to strptime()#144819
jyalim wants to merge 11 commits intopython:mainfrom
jyalim:fix-issue-140715--D

Conversation

@jyalim
Copy link
Contributor

@jyalim jyalim commented Feb 14, 2026

Incrementally builds C99+ datetime support with addition of %D with single line of code. Also adds tests and updates documentation.

Continued effort from PR: #140647.

Documentation drops (0) footnote, changes example date to increase readability for non-US readers.

Passed all tests (especially changes to new one).

Passed patchcheck.


📚 Documentation preview 📚: https://cpython-previews--144819.org.readthedocs.build/

@StanFromIreland StanFromIreland changed the title gh-140715: Incremental fix for issue 140715, add %D token to strptime gh-140715: Add %D token to strptime() Feb 14, 2026
@StanFromIreland StanFromIreland changed the title gh-140715: Add %D token to strptime() gh-140715: Add %D format code support to strptime() Feb 14, 2026
Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to update test_strptime_exception_context to use a different (invalid) format code.

Also please add it here too:

for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',

@jyalim
Copy link
Contributor Author

jyalim commented Feb 14, 2026

Thank you, those critical changes were made!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants