Skip to content

Commit

Permalink
Create ke.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
bkmgit authored Mar 6, 2022
1 parent cd11fdc commit 6463dfb
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions ke.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 6463dfb

Please sign in to comment.