From f1e2f53c579b986b3f219ceef8b37c0ce75a9cba Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Wed, 10 Nov 2021 10:35:05 +0000 Subject: [PATCH 1/6] Add Platinum Jubilee bank holiday for 2022 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Extra Bank Holiday to mark The Queen’s Platinum Jubilee in 2022](https://www.gov.uk/government/news/extra-bank-holiday-to-mark-the-queens-platinum-jubilee-in-2022). In addition, the Spring Bank Holiday has been moved to 2nd June for 2022 only. See [GOV.UK Bank holidays](https://www.gov.uk/bank-holidays#england-and-wales) for an official reference. --- gb.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gb.yaml b/gb.yaml index a8688bb..884f06b 100644 --- a/gb.yaml +++ b/gb.yaml @@ -67,6 +67,25 @@ months: regions: [gb] week: -1 wday: 1 + year_ranges: + until: 2021 + - name: Bank Holiday + regions: [gb] + week: -1 + wday: 1 + year_ranges: + from: 2023 + 6: + name: Bank Holiday + regions: [gb] + mday: 2 + year_ranges: + limited: 2022 + - name: Platinum Jubilee + regions: [gb] + mday: 3 + year_ranges: + limited: [2022] 7: - name: Tynwald Day regions: [im, gb_iom] From 2f3a1ead1d39f9300872ce88bd995a4b2e4aea5c Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Mon, 22 Nov 2021 10:07:57 +0000 Subject: [PATCH 2/6] Add missing dash Co-authored-by: Harry Lascelles --- gb.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gb.yaml b/gb.yaml index 884f06b..fc48d5c 100644 --- a/gb.yaml +++ b/gb.yaml @@ -76,7 +76,7 @@ months: year_ranges: from: 2023 6: - name: Bank Holiday + - name: Bank Holiday regions: [gb] mday: 2 year_ranges: From d30549df5d90c841847806744963b957bb5ab05b Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Mon, 22 Nov 2021 10:14:49 +0000 Subject: [PATCH 3/6] bugfix: limited year_range value must be an array --- gb.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gb.yaml b/gb.yaml index fc48d5c..510bb4a 100644 --- a/gb.yaml +++ b/gb.yaml @@ -80,7 +80,7 @@ months: regions: [gb] mday: 2 year_ranges: - limited: 2022 + limited: [2022] - name: Platinum Jubilee regions: [gb] mday: 3 From cea1ef7bd3e1f64e16ea984dd01fee286b6537f6 Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Mon, 22 Nov 2021 10:14:55 +0000 Subject: [PATCH 4/6] remove whitespace --- gb.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gb.yaml b/gb.yaml index 510bb4a..f068ead 100644 --- a/gb.yaml +++ b/gb.yaml @@ -74,7 +74,7 @@ months: week: -1 wday: 1 year_ranges: - from: 2023 + from: 2023 6: - name: Bank Holiday regions: [gb] From e0aded7305266e03580876e6860a911e975c264e Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Mon, 22 Nov 2021 10:28:00 +0000 Subject: [PATCH 5/6] Add tests for the moved bank holiday and Platinum Jubilee --- gb.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gb.yaml b/gb.yaml index f068ead..1b80f48 100644 --- a/gb.yaml +++ b/gb.yaml @@ -475,3 +475,13 @@ tests: regions: ["je"] expect: name: "Bank Holiday" + - given: + date: '2022-06-02' + regions: ["gb"] + expect: + name: "Bank Holiday" + - given: + date: '2022-06-03' + regions: ["gb"] + expect: + name: "Platinum Jubilee" From f41d1c15db1ed1c6800e428b1c2c8d1b01c6886f Mon Sep 17 00:00:00 2001 From: Frankie Roberto Date: Mon, 20 Dec 2021 20:02:49 +0000 Subject: [PATCH 6/6] Add further tests for moved Bank Holiday MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds 2 further tests for: 1. No holiday on 30 May (last Monday) 2022 – as it’s been moved to June 2. Bank holiday on 29 May 2023 (back following usual rules) --- gb.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gb.yaml b/gb.yaml index 1b80f48..b39a4bf 100644 --- a/gb.yaml +++ b/gb.yaml @@ -480,8 +480,18 @@ tests: regions: ["gb"] expect: name: "Bank Holiday" + - given: + date: '2022-05-30' + regions: ["gb"] + expect: + holiday: false - given: date: '2022-06-03' regions: ["gb"] expect: name: "Platinum Jubilee" + - given: + date: '2023-05-29' + regions: ["gb"] + expect: + name: "Bank Holiday"