holidays/data/ie.yaml

58 lines
1.4 KiB
YAML

# Ireland holiday definitions for the Ruby Holiday gem.
#
# Updated: 2008-11-28.
# Sources:
# - http://en.wikipedia.org/wiki/Public_holidays_in_the_Republic_of_Ireland
# - http://www.citizensinformation.ie/categories/employment/employment-rights-and-conditions/leave-and-holidays/public-holidays-in-ireland
---
months:
0:
- name: Easter Monday
regions: [ie]
function: easter(year)+1
1:
- name: New Year's Day
regions: [ie]
mday: 1
3:
- name: St. Patrick's Day
regions: [ie]
mday: 17
5:
- name: May Day
regions: [ie]
week: 1
wday: 1
6:
- name: Bank Holiday
regions: [ie]
week: 1
wday: 1
8:
- name: Bank Holiday
regions: [ie]
week: 1
wday: 1
10:
- name: Bank Holiday
regions: [ie]
week: -1
wday: 1
12:
- name: Christmas Day
regions: [ie]
mday: 25
- name: St. Stephen's Day
regions: [ie]
mday: 26
tests: |
{Date.civil(2008,1,1) => 'New Year\'s Day',
Date.civil(2008,3,17) => 'St. Patrick\'s Day',
Date.civil(2008,3,24) => 'Easter Monday',
Date.civil(2008,5,5) => 'May Day',
Date.civil(2008,6,2) => 'Bank Holiday',
Date.civil(2008,8,4) => 'Bank Holiday',
Date.civil(2008,12,25) => 'Christmas Day',
Date.civil(2008,12,26) => 'St. Stephen\'s Day'}.each do |date, name|
assert_equal name, (Holidays.on(date, :ie, :informal)[0] || {})[:name]
end