Skip to content

Commit

Permalink
add extra for coronation
Browse files Browse the repository at this point in the history
  • Loading branch information
dten committed Feb 27, 2023
1 parent d0aa393 commit 8e1e8bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/uk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub fn is_bankholiday<T: Datelike>(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
_ => {}
}

Expand Down Expand Up @@ -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)]);

}

0 comments on commit 8e1e8bf

Please sign in to comment.