-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Currently the docs for datetime.strptime and datetime.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 of strftime/strptime.
I therefore suggest the following changes:
- add an example before the table with the format codes, showing some of the most common codes;
- add links to
(date|time|datetime).isoformatin the docs for(date|time|datetime).strptime; - add links to
datetime.fromisoformatin the docs fordatetime.strptime(dateandtimehave a.fromisoformatmethod, but no.strptimemethod);
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done