]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-70647: update docs to mention the datetime 1900 year default 2/29 issue...
authorGregory P. Smith <greg@krypto.org>
Fri, 21 Mar 2025 04:50:10 +0000 (21:50 -0700)
committerGitHub <noreply@github.com>
Fri, 21 Mar 2025 04:50:10 +0000 (21:50 -0700)
commit3eb7a9024b91d67d1c137633038e64e361b6fcd4
treed94a99e89838b3f8d030153d5124a6978a3bd38e
parente1626c3b70ed04e264d802a8ed83d70ca248fded
[3.12] gh-70647: update docs to mention the datetime 1900 year default 2/29 issue (#131534)

* gh-70647: Better promote how to safely parse yearless dates in datetime.

Every four years people encounter this because it just isn't obvious.
This moves the footnote up to a note with a code example.

We'd love to change the default year value for datetime but doing
that could have other consequences for existing code.  This documented
workaround *always* works.

* doctest code within note is bad, dedent.
Doc/library/datetime.rst