Skip to content

need datetime.date.strptime(format) #124923

@ArtemIsmagilov

Description

@ArtemIsmagilov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions