diff --git a/web_view.py b/web_view.py index 4ceaeb2..96c3457 100755 --- a/web_view.py +++ b/web_view.py @@ -242,11 +242,6 @@ def travel_list() -> str: ) -def as_date(d: date | datetime) -> date: - """Date of event.""" - return d.date() if isinstance(d, datetime) else d - - def build_conference_list() -> list[StrDict]: """Build conference list.""" data_dir = app.config["PERSONAL_DATA"] @@ -260,8 +255,8 @@ def build_conference_list() -> list[StrDict]: conference_trip_lookup[key] = trip for conf in items: - conf["start_date"] = as_date(conf["start"]) - conf["end_date"] = as_date(conf["end"]) + conf["start_date"] = agenda.utils.as_date(conf["start"]) + conf["end_date"] = agenda.utils.as_date(conf["end"]) price = conf.get("price") if price: