-
Notifications
You must be signed in to change notification settings - Fork 138
/
Copy pathie.yaml
79 lines (79 loc) · 2.48 KB
/
ie.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Ireland holiday definitions for the Ruby Holiday gem.
#
# Updated: 2012-03-16.
# 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
# While there is mention that Jan 2 2012 was not officially a bank holiday, in reality very few businesses will not observe that date as a bank holiday
---
months:
0:
- name: Easter Monday
regions: [ie]
function: easter(year)
function_modifier: 1
1:
- name: New Year's Day
regions: [ie]
mday: 1
observed: to_monday_if_weekend(date)
3:
- name: St. Patrick's Day
regions: [ie]
mday: 17
observed: to_monday_if_weekend(date)
5:
- name: May Day
regions: [ie]
week: 1
wday: 1
6:
- name: June Bank Holiday
regions: [ie]
week: 1
wday: 1
8:
- name: August Bank Holiday
regions: [ie]
week: 1
wday: 1
10:
- name: October Bank Holiday
regions: [ie]
week: -1
wday: 1
12:
- name: Christmas Day
regions: [ie]
mday: 25
observed: to_monday_if_weekend(date)
- name: St. Stephen's Day
regions: [ie]
mday: 26
observed: to_weekday_if_boxing_weekend(date)
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) => 'June Bank Holiday',
Date.civil(2008,8,4) => 'August Bank Holiday',
Date.civil(2008,10,27) => 'October 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)[0] || {})[:name]
end
{Date.civil(2012,1,2) => 'New Year\'s Day',
Date.civil(2012,3,19) => 'St. Patrick\'s Day',
Date.civil(2012,4,9) => 'Easter Monday',
Date.civil(2012,5,7) => 'May Day',
Date.civil(2012,6,4) => 'June Bank Holiday',
Date.civil(2012,8,6) => 'August Bank Holiday',
Date.civil(2012,10,29) => 'October Bank Holiday',
Date.civil(2011,12,26) => 'Christmas Day',
Date.civil(2011,12,27) => 'St. Stephen\'s Day',
Date.civil(2012,12,25) => 'Christmas Day',
Date.civil(2012,12,26) => 'St. Stephen\'s Day',
Date.civil(2015,12,28) => 'St. Stephen\'s Day'}.each do |date, name|
assert_equal name, (Holidays.on(date, :ie, :observed)[0] || {})[:name]
end