From 8e1e8bfdc39cbe39d6a17b22b4dfaefdb454cfa8 Mon Sep 17 00:00:00 2001 From: David Hewson Date: Mon, 27 Feb 2023 13:21:45 +0000 Subject: [PATCH] add extra for coronation --- src/uk.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/uk.rs b/src/uk.rs index 1e4ab68..b3777e7 100644 --- a/src/uk.rs +++ b/src/uk.rs @@ -29,6 +29,7 @@ pub fn is_bankholiday(date: &T) -> bool { (2022, 06, 02) => return true, (2022, 06, 03) => return true, // Extra for Jubilee (2022, 09, 19) => return true, // Extra for QE2 funeral + (2023, 05, 08) => return true, // Extra for C3 coronation _ => {} } @@ -133,4 +134,10 @@ mod tests { test!(year_2022, 2022, [(3, 1), (15, 4), (18, 4), (2, 5), (2, 6), (3, 6), (29, 8), (19, 9), (26, 12), (27, 12)]); + test!(year_2023, 2023, + [(2, 1), (7, 4), (10, 4), (1, 5), (8, 5), (29, 5), (28, 8), (25, 12), (26, 12)]); + + test!(year_2024, 2024, + [(1, 1), (29, 3), (1, 4), (6, 5), (27, 5), (26, 8), (25, 12), (26, 12)]); + }