From 44fcf461782710106d09da4939f679c58659c2a6 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Thu, 23 Nov 2023 21:23:29 +0000 Subject: [PATCH] Handle rocket launches with precision set to year --- agenda/thespacedevs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agenda/thespacedevs.py b/agenda/thespacedevs.py index 0523518..f6107a2 100644 --- a/agenda/thespacedevs.py +++ b/agenda/thespacedevs.py @@ -42,6 +42,8 @@ def format_time(time_str: str, net_precision: str) -> tuple[str, str | None]: # Format the date based on precision time_format: str | None = None field2 = None + if net_precision == "Year": + time_format = "%Y" if net_precision == "Month": time_format = "%b %Y" if net_precision == "Week":