-
Notifications
You must be signed in to change notification settings - Fork 136
/
nyse.yaml
137 lines (135 loc) · 2.91 KB
/
nyse.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# NYSE holiday definitions for the Ruby Holiday gem.
#
# By Alan Larkin
# Source: http://www.nyse.com/about/newsevents/1176373643795.html#earlyclose2008
#
# Updated 2008-11-19.
#
# Source: https://www.nyse.com/markets/hours-calendars
# Updated 2017-03-14 By Vassilios Liatsos
---
months:
0:
- name: Good Friday
regions: [nyse]
function: easter(year)
function_modifier: -2
1:
- name: New Year's Day
regions: [nyse]
mday: 1
observed: to_monday_if_sunday(date)
- name: Martin Luther King, Jr. Day
week: 3
regions: [nyse]
wday: 1
2:
- name: Presidents' Day
week: 3
regions: [nyse]
wday: 1
5:
- name: Memorial Day
week: -1
regions: [nyse]
wday: 1
6:
- name: Juneteenth National Independence Day
regions: [nyse]
mday: 19
observed: to_weekday_if_weekend(date)
year_ranges:
from: 2022
7:
- name: Independence Day
regions: [nyse]
mday: 4
observed: to_weekday_if_weekend(date)
9:
- name: Labor Day
week: 1
regions: [nyse]
wday: 1
11:
- name: Thanksgiving
week: 4
regions: [nyse]
wday: 4
12:
- name: Christmas Day
regions: [nyse]
mday: 25
observed: to_weekday_if_weekend(date)
tests:
- given:
date: '2008-01-01'
regions: ["nyse"]
expect:
name: "New Year's Day"
- given:
date: ['2017-01-02', '2012-01-02', '2011-01-01', '2006-01-02']
regions: ["nyse"]
options: ["observed"]
expect:
name: "New Year's Day"
- given:
date: '2008-01-21'
regions: ["nyse"]
expect:
name: "Martin Luther King, Jr. Day"
- given:
date: '2008-02-18'
regions: ["nyse"]
expect:
name: "Presidents' Day"
- given:
date: '2008-03-21'
regions: ["nyse"]
expect:
name: "Good Friday"
- given:
date: '2008-05-26'
regions: ["nyse"]
expect:
name: "Memorial Day"
- given:
date: '2008-07-04'
regions: ["nyse"]
expect:
name: "Independence Day"
- given:
date: '2008-09-01'
regions: ["nyse"]
expect:
name: "Labor Day"
- given:
date: '2008-11-27'
regions: ["nyse"]
expect:
name: "Thanksgiving"
- given:
date: '2008-12-25'
regions: ["nyse"]
expect:
name: "Christmas Day"
# Test observed New Year
- given:
date: ['2017-01-02', '2012-01-02', '2011-01-01', '2006-01-02']
regions: ["nyse"]
options: ["observed"]
expect:
name: "New Year's Day"
# Test observed Juneteenth National Independence Day
- given:
date: ['2022-06-20', '2023-06-19', '2024-06-19', '2027-06-18']
regions: ["nyse"]
options: ["observed"]
expect:
name: "Juneteenth National Independence Day"
# Ensure that Juneteenth National Independence Day not observed before 2022
- given:
date: ['2021-06-18']
regions: ["nyse"]
options: ["observed"]
expect:
holiday: false