Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need datetime.date.strptime(format) #124923

Closed
ArtemIsmagilov opened this issue Oct 3, 2024 · 1 comment
Closed

need datetime.date.strptime(format) #124923

ArtemIsmagilov opened this issue Oct 3, 2024 · 1 comment
Labels
type-feature A feature request or enhancement

Comments

@ArtemIsmagilov
Copy link

ArtemIsmagilov commented Oct 3, 2024

Feature or enhancement

Proposal:

from datetime import date
date.strptime('31/01/22', '%d/%m/%y')
>>>datetime.date(2022, 1, 31)

Has this already been discussed elsewhere?

No

Links to previous discussion of this feature:

I need a method for date - strptime. This will allow you to get rid of unnecessary conversions from datetime to date.
I'd like to only work with date objects.
It's great that you have the strftime method for date. But strptime is missing.

I would like to emphasize that I would not like to once again create a datetime object, fill it with empty values, and then convert it to date.

@ArtemIsmagilov ArtemIsmagilov added the type-feature A feature request or enhancement label Oct 3, 2024
@ericvsmith
Copy link
Member

This will be in 3.14, added by #41431

@ericvsmith ericvsmith closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
Archived in project
Development

No branches or pull requests

2 participants