diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-18 11:55:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-18 11:55:27 -0700 |
commit | 452b417e34489614b3003b8d08148269096239d5 (patch) | |
tree | 9ba681655ebec721b100c147f0b6c5f5ede4684c /Misc | |
parent | 624c9a27b10df4355eb2caf04654c730dfa412dd (diff) | |
download | cpython-git-452b417e34489614b3003b8d08148269096239d5.tar.gz |
bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)
For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional.
This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true.
bpo-34903
(cherry picked from commit 6b9c204ee77a0de87d6f51a3d4547a18604cef9e)
Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Documentation/2019-06-17-09-36-46.bpo-34903.r_wGRc.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Documentation/2019-06-17-09-36-46.bpo-34903.r_wGRc.rst b/Misc/NEWS.d/next/Documentation/2019-06-17-09-36-46.bpo-34903.r_wGRc.rst new file mode 100644 index 0000000000..7e277f4ec1 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2019-06-17-09-36-46.bpo-34903.r_wGRc.rst @@ -0,0 +1 @@ +Documented that in :meth:`datetime.datetime.strptime()`, the leading zero in some two-digit formats is optional. Patch by Mike Gleen.
|