From 6463dfbd80d48b471f54858602afc80b04366f15 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Sun, 6 Mar 2022 19:06:41 +0300 Subject: [PATCH] Create ke.yaml --- ke.yaml | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 ke.yaml diff --git a/ke.yaml b/ke.yaml new file mode 100644 index 0000000..be2be27 --- /dev/null +++ b/ke.yaml @@ -0,0 +1,107 @@ +# Kenya holiday definitions for the Ruby Holiday gem. +# Updated: 2022-03-06 +# Missing Diwali, Idd-ul-Fitr and Idd-ul-Azha +# Sources: +# - https://en.wikipedia.org/wiki/Public_holidays_in_Kenya +# - https://www.timeanddate.com/holidays/kenya/ +# - http://www.kenyalaw.org/kl/fileadmin/pdfdownloads/Acts/PublicHolidaysActCap110.pdf +--- +months: + 0: + - name: Good Friday + regions: [ke] + function: easter(year) + function_modifier: -2 + - name: Easter Monday + regions: [ke] + function: easter(year) + function_modifier: 1 + 1: + - name: New Year's Day + regions: [ke] + mday: 1 + observed: to_monday_if_sunday(date) + 5: + - name: Labour Day + regions: [ke] + mday: 1 + observed: to_monday_if_sunday(date) + 6: + - name: Madaraka Day + regions: [ke] + mday: 1 + observed: to_monday_if_sunday(date) + 10: + - name: Huduma Day + regions: [ke] + mday: 10 + observed: to_monday_if_sunday(date) + - name: Mashujaa Day + regions: [ke] + mday: 20 + observed: to_monday_if_sunday(date) + 12: + - name: Jamhuri Day + regions: [ke] + mday: 12 + observed: to_monday_if_sunday(date) + - name: Christmas Day + regions: [ke] + mday: 25 + observed: to_monday_if_sunday(date) + - name: Utamaduni Day + regions: [ke] + mday: 26 + observed: to_monday_if_sunday(date) + +tests: + - given: + date: '2008-03-21' + regions: ["ke"] + expect: + name: "Good Friday" + - given: + date: '2008-03-24' + regions: ["ke"] + expect: + name: "Easter Monday" + - given: + date: '2008-01-01' + regions: ["ke"] + expect: + name: "New Year's Day" + - given: + date: '2008-05-01' + regions: ["ke"] + expect: + name: "Labour Day" + - given: + date: '2019-06-01' + regions: ["ke"] + expect: + name: "Madaraka Day" + - given: + date: '2018-10-10' + regions: ["ke"] + expect: + name: "Huduma Day" + - given: + date: '2018-10-20' + regions: ["ke"] + expect: + name: "Mashujaa Day" + - given: + date: '2019-12-12' + regions: ["ke"] + expect: + name: "Jamhuri Day" + - given: + date: '2008-12-25' + regions: ["ke"] + expect: + name: "Christmas Day" + - given: + date: '2018-12-26' + regions: ["ke"] + expect: + name: "Utamaduni Day"