Add strptime
/strftime
format code examples
#100574
Labels
3.11
only security fixes
3.12
bugs and security fixes
docs
Documentation in the Doc dir
type-feature
A feature request or enhancement
Currently the docs for
datetime.strptime
anddatetime.strftime
don't include an example but have a link to the table with the format codes, where I end up having to reconstruct the right combination every time. At the end of each class docs there are some examples, but there are no links pointing to them, so they aren't easily discoverable. In addition, the.(from)isoformat
methods can often be used instead ofstrftime
/strptime
.I therefore suggest the following changes:
(date|time|datetime).isoformat
in the docs for(date|time|datetime).strptime
;datetime.fromisoformat
in the docs fordatetime.strptime
(date
andtime
have a.fromisoformat
method, but no.strptime
method);Linked PRs
strptime
/strftime
docs #100575strptime
/strftime
docs (GH-100575) #103368The text was updated successfully, but these errors were encountered: