Skip to content

Initialize from existing datetime.date object? #250

@jacebrowning

Description

@jacebrowning

pendulum.instance(dt) works for datetime.datetime, but how can I initialize a Pendulum object from an existing datetime.date (specifically a Django DateField)?


My current workaround:

pendulum.parse(str(date_object))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions