-
Notifications
You must be signed in to change notification settings - Fork 137
/
federal_reserve.yaml
114 lines (110 loc) · 3.59 KB
/
federal_reserve.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Federal reserve holidays definition for the Ruby Holiday gem.
#
# Updated: 2015-03-16
#
# Sources:
# - http://www.federalreserve.gov/aboutthefed/k8.htm
---
months:
1:
- name: New Year's Day
regions: [federal_reserve]
mday: 1
observed: to_monday_if_sunday(date)
- name: Birthday of Martin Luther King, Jr
week: 3
wday: 1
regions: [federal_reserve]
2:
- name: Washington's Birthday
week: 3
wday: 1
regions: [federal_reserve]
5:
- name: Memorial Day
week: -1
wday: 1
regions: [federal_reserve]
7:
- name: Independence Day
regions: [federal_reserve]
mday: 4
observed: to_monday_if_sunday(date)
9:
- name: Labor Day
week: 1
regions: [federal_reserve]
wday: 1
10:
- name: Columbus Day
week: 2
regions: [federal_reserve]
wday: 1
11:
- name: Veterans Day
regions: [federal_reserve]
mday: 11
observed: to_monday_if_sunday(date)
- name: Thanksgiving Day
week: 4
wday: 4
regions: [federal_reserve]
12:
- name: Christmas Day
regions: [federal_reserve]
mday: 25
observed: to_monday_if_sunday(date)
tests: |
{Date.civil(2012,1,2) => "New Year's Day",
Date.civil(2012,1,16) => "Birthday of Martin Luther King, Jr",
Date.civil(2012,2,20) => "Washington's Birthday",
Date.civil(2012,5,28) => "Memorial Day",
Date.civil(2012,7,4) => "Independence Day",
Date.civil(2012,9,3) => "Labor Day",
Date.civil(2012,10,8) => "Columbus Day",
Date.civil(2012,11,12) => "Veterans Day",
Date.civil(2012,11,22) => "Thanksgiving Day",
Date.civil(2012,12,25) => "Christmas Day",
Date.civil(2013,1,1) => "New Year's Day",
Date.civil(2013,1,21) => "Birthday of Martin Luther King, Jr",
Date.civil(2013,2,18) => "Washington's Birthday",
Date.civil(2013,5,27) => "Memorial Day",
Date.civil(2013,7,4) => "Independence Day",
Date.civil(2013,9,2) => "Labor Day",
Date.civil(2013,10,14) => "Columbus Day",
Date.civil(2013,11,11) => "Veterans Day",
Date.civil(2013,11,28) => "Thanksgiving Day",
Date.civil(2013,12,25) => "Christmas Day",
Date.civil(2014,1,1) => "New Year's Day",
Date.civil(2014,1,20) => "Birthday of Martin Luther King, Jr",
Date.civil(2014,2,17) => "Washington's Birthday",
Date.civil(2014,5,26) => "Memorial Day",
Date.civil(2014,7,4) => "Independence Day",
Date.civil(2014,9,1) => "Labor Day",
Date.civil(2014,10,13) => "Columbus Day",
Date.civil(2014,11,11) => "Veterans Day",
Date.civil(2014,11,27) => "Thanksgiving Day",
Date.civil(2014,12,25) => "Christmas Day",
Date.civil(2015,1,1) => "New Year's Day",
Date.civil(2015,1,19) => "Birthday of Martin Luther King, Jr",
Date.civil(2015,2,16) => "Washington's Birthday",
Date.civil(2015,5,25) => "Memorial Day",
Date.civil(2015,7,4) => "Independence Day",
Date.civil(2015,9,7) => "Labor Day",
Date.civil(2015,10,12) => "Columbus Day",
Date.civil(2015,11,11) => "Veterans Day",
Date.civil(2015,11,26) => "Thanksgiving Day",
Date.civil(2015,12,25) => "Christmas Day",
Date.civil(2016,1,1) => "New Year's Day",
Date.civil(2016,1,18) => "Birthday of Martin Luther King, Jr",
Date.civil(2016,2,15) => "Washington's Birthday",
Date.civil(2016,5,30) => "Memorial Day",
Date.civil(2016,7,4) => "Independence Day",
Date.civil(2016,9,5) => "Labor Day",
Date.civil(2016,10,10) => "Columbus Day",
Date.civil(2016,11,11) => "Veterans Day",
Date.civil(2016,11,24) => "Thanksgiving Day",
Date.civil(2016,12,26) => "Christmas Day",
}.each do |date, name|
assert_equal name, (Holidays.on(date, :federal_reserve, :observed)[0] || {})[:name]
end