]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-41431: Add `datetime.time.strptime()` and `datetime.date.strptime()` (#120752)
authorNice Zombies <nineteendo19d0@gmail.com>
Wed, 25 Sep 2024 21:43:58 +0000 (23:43 +0200)
committerGitHub <noreply@github.com>
Wed, 25 Sep 2024 21:43:58 +0000 (14:43 -0700)
commit9968caa0cc8a4d07595f0e0abe5f28ba9b6f7a96
tree34514828a85ef128027d75c737858a5eebc6fbbf
parentb0c6cf5f17f0be13aa927cf141a289f7b76ae6b1
gh-41431: Add `datetime.time.strptime()` and `datetime.date.strptime()` (#120752)

* Python implementation

* C implementation

* Test `date.strptime`

* Test `time.strptime`

* ðŸ“œðŸ¤– Added by blurb_it.

* Update whatsnew

* Update documentation

* Add leap year note

* Update 2024-06-19-19-53-42.gh-issue-41431.gnkUc5.rst

* Apply suggestions from code review

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Remove parentheses

* Use helper function

* Remove bad return

* Link to github issue

* Fix directive

* Apply suggestions from code review

Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
* Fix test cases

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Doc/library/datetime.rst
Doc/whatsnew/3.14.rst
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_global_strings.h
Include/internal/pycore_runtime_init_generated.h
Include/internal/pycore_unicodeobject_generated.h
Lib/_pydatetime.py
Lib/_strptime.py
Lib/test/datetimetester.py
Misc/NEWS.d/next/Library/2024-06-19-19-53-42.gh-issue-41431.gnkUc5.rst [new file with mode: 0644]
Modules/_datetimemodule.c