-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed as not planned
Description
click.DateTime is great, and you can use click.DateTime(formats=["%Y-%m-%d"]) to ensure that the value is logically just a date. However, the resulting object is still a datetime.datetime, which isn't ideal if you want to be dealing with pure dates.
Right now I'm working around this by using a click.DateTime() argument and doing start_date = start_date.date() at the top of my function, but that's not ideal because my team considers variable reassignment to be a code smell. I could rename the argument to something else, but that's also something of a kluge.
It'd be great to have a click.Date argument type that would act similarly to click.DateTime and return a date only.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels