diff --git a/agenda/utils.py b/agenda/utils.py index ff311d0..eb66a74 100644 --- a/agenda/utils.py +++ b/agenda/utils.py @@ -2,10 +2,8 @@ from datetime import date, datetime, timezone -DateOrDateTime = datetime | date - -def as_date(d: DateOrDateTime) -> date: +def as_date(d: datetime | date) -> date: """Convert datetime to date.""" match d: case datetime(): @@ -16,7 +14,7 @@ def as_date(d: DateOrDateTime) -> date: raise TypeError(f"Unsupported type: {type(d)}") -def as_datetime(d: DateOrDateTime) -> datetime: +def as_datetime(d: datetime | date) -> datetime: """Date/time of event.""" match d: case datetime():