From 45872acb9d89eecd6a6619f9295037ee5a846c3f Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Tue, 3 Oct 2023 09:54:13 +0100 Subject: [PATCH] Add last Christmas posting day --- agenda/__init__.py | 3 +++ templates/index.html | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/agenda/__init__.py b/agenda/__init__.py index d53174e..fa8440b 100644 --- a/agenda/__init__.py +++ b/agenda/__init__.py @@ -38,6 +38,8 @@ now_utc = datetime.now(timezone.utc) next_us_presidential_election = date(2024, 11, 5) next_uk_general_election = date(2024, 5, 2) +xmas_last_posting_dates = {"first": date(2023, 12, 20), "second": date(2023, 12, 18)} + config_filename = os.path.join(os.path.dirname(__file__), "..", "config") assert os.path.exists(config_filename) @@ -276,6 +278,7 @@ def get_data() -> dict[str, str | object]: "mothers_day": next_uk_mothers_day(today), "fathers_day": next_uk_fathers_day(today), "uk_financial_year_end": uk_financial_year_end(today), + "xmas_last_posting_dates": xmas_last_posting_dates, } return reply diff --git a/templates/index.html b/templates/index.html index a0f4165..ac6d19b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -57,6 +57,15 @@
  • US pres. election: {{days(next_us_presidential_election)}} {{next_us_presidential_election.strftime("%a, %d %b %Y")}}
  • + +
  • Christmas last posting 2nd class: + {{days(xmas_last_posting_dates["second"])}} + {{xmas_last_posting_dates["second"].strftime("%a, %d %b %Y")}}
  • + +
  • Christmas last posting 1st class: + {{days(xmas_last_posting_dates["first"])}} + {{xmas_last_posting_dates["first"].strftime("%a, %d %b %Y")}}
  • +

    Stock markets