]> granicus.if.org Git - python/commit
bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)
authorMike Gleen <mike.gleen@gmail.com>
Tue, 18 Jun 2019 18:14:57 +0000 (19:14 +0100)
committerPaul Ganssle <pganssle@users.noreply.github.com>
Tue, 18 Jun 2019 18:14:57 +0000 (19:14 +0100)
commit6b9c204ee77a0de87d6f51a3d4547a18604cef9e
treee07329c362e57061ba6cc59258b812569c808ac4
parent59543347d12a7717235f941e7fd363d4df92984a
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
Doc/library/datetime.rst
Lib/test/datetimetester.py
Misc/NEWS.d/next/Documentation/2019-06-17-09-36-46.bpo-34903.r_wGRc.rst [new file with mode: 0644]