pandas-market-calendars 4.3.2__py3-none-any.whl → 4.3.3__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. pandas_market_calendars/__init__.py +38 -38
  2. pandas_market_calendars/calendar_registry.py +53 -52
  3. pandas_market_calendars/calendar_utils.py +261 -261
  4. pandas_market_calendars/calendars/asx.py +66 -66
  5. pandas_market_calendars/calendars/bmf.py +206 -206
  6. pandas_market_calendars/calendars/bse.py +407 -407
  7. pandas_market_calendars/calendars/cboe.py +145 -145
  8. pandas_market_calendars/calendars/cme.py +402 -402
  9. pandas_market_calendars/calendars/cme_globex_agriculture.py +126 -127
  10. pandas_market_calendars/calendars/cme_globex_base.py +119 -119
  11. pandas_market_calendars/calendars/cme_globex_crypto.py +160 -147
  12. pandas_market_calendars/calendars/cme_globex_energy_and_metals.py +216 -216
  13. pandas_market_calendars/calendars/cme_globex_equities.py +123 -121
  14. pandas_market_calendars/calendars/cme_globex_fixed_income.py +136 -134
  15. pandas_market_calendars/calendars/cme_globex_fx.py +101 -92
  16. pandas_market_calendars/calendars/eurex.py +139 -139
  17. pandas_market_calendars/calendars/eurex_fixed_income.py +98 -0
  18. pandas_market_calendars/calendars/hkex.py +426 -426
  19. pandas_market_calendars/calendars/ice.py +81 -81
  20. pandas_market_calendars/calendars/iex.py +112 -111
  21. pandas_market_calendars/calendars/jpx.py +109 -109
  22. pandas_market_calendars/calendars/lse.py +114 -114
  23. pandas_market_calendars/calendars/mirror.py +130 -129
  24. pandas_market_calendars/calendars/nyse.py +1324 -1324
  25. pandas_market_calendars/calendars/ose.py +116 -116
  26. pandas_market_calendars/calendars/sifma.py +350 -335
  27. pandas_market_calendars/calendars/six.py +132 -132
  28. pandas_market_calendars/calendars/sse.py +311 -311
  29. pandas_market_calendars/calendars/tase.py +197 -195
  30. pandas_market_calendars/calendars/tsx.py +181 -181
  31. pandas_market_calendars/holidays/cme.py +385 -372
  32. pandas_market_calendars/holidays/cme_globex.py +214 -223
  33. pandas_market_calendars/holidays/cn.py +1455 -1455
  34. pandas_market_calendars/holidays/jp.py +398 -394
  35. pandas_market_calendars/holidays/nyse.py +1531 -1539
  36. pandas_market_calendars/holidays/oz.py +63 -65
  37. pandas_market_calendars/holidays/sifma.py +338 -350
  38. pandas_market_calendars/holidays/us.py +376 -377
  39. pandas_market_calendars/market_calendar.py +895 -895
  40. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/METADATA +3 -3
  41. pandas_market_calendars-4.3.3.dist-info/RECORD +50 -0
  42. pandas_market_calendars-4.3.2.dist-info/RECORD +0 -49
  43. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/LICENSE +0 -0
  44. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/NOTICE +0 -0
  45. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/WHEEL +0 -0
  46. {pandas_market_calendars-4.3.2.dist-info → pandas_market_calendars-4.3.3.dist-info}/top_level.txt +0 -0
@@ -1,394 +1,398 @@
1
- from dateutil.relativedelta import MO
2
- from pandas import DateOffset, Timestamp
3
- from pandas.tseries.holiday import Holiday, sunday_to_monday
4
-
5
- from pandas_market_calendars.holidays.jpx_equinox import (
6
- autumnal_citizen_dates,
7
- autumnal_equinox,
8
- vernal_equinox,
9
- )
10
-
11
- AscensionDays = [
12
- Timestamp("2019-04-30", tz="UTC"), # National Holiday
13
- Timestamp("2019-05-01", tz="UTC"), # Ascension Day
14
- Timestamp("2019-05-02", tz="UTC"), # National Holiday
15
- ]
16
-
17
- MarriageDays = [
18
- Timestamp("1959-04-10", tz="UTC"), # Akihito
19
- Timestamp("1993-06-09", tz="UTC"), # Naruhito
20
- ]
21
-
22
- FuneralShowa = [
23
- Timestamp("1989-02-24", tz="UTC"),
24
- ]
25
-
26
- EnthronementDays = [
27
- Timestamp("1990-11-12", tz="UTC"), # Akihito
28
- Timestamp("2019-10-22", tz="UTC"), # Naruhito
29
- ]
30
-
31
- AutumnalCitizenDates = autumnal_citizen_dates()
32
-
33
- NoN225IndexPrices = [
34
- # source: https://indexes.nikkei.co.jp/en/nkave/archives/data
35
- # TODO: determine if these dates were also national holidays
36
- Timestamp("1951-02-15", tz="UTC"),
37
- Timestamp("1953-02-09", tz="UTC"),
38
- Timestamp("1954-10-26", tz="UTC"),
39
- Timestamp("1959-04-10", tz="UTC"),
40
- ]
41
-
42
- EquityTradingSystemFailure = [
43
- # The Failure of Equity Trading System on October 1, 2020
44
- # source: https://www.jpx.co.jp/english/corporate/news/news-releases/0060/20201019-01.html
45
- Timestamp("2020-10-01", tz="UTC"),
46
- ]
47
-
48
- JapanNewYearsDay2 = Holiday(
49
- name="New Year's Day",
50
- month=1,
51
- day=2,
52
- observance=sunday_to_monday,
53
- )
54
-
55
- JapanNewYearsDay3 = Holiday(
56
- name="New Year's Day",
57
- month=1,
58
- day=3,
59
- )
60
-
61
- JapanComingOfAgeDay1951To1973 = Holiday(
62
- name="Coming of Age Day",
63
- month=1,
64
- day=15,
65
- start_date=Timestamp(1951, 1, 1),
66
- end_date=Timestamp(1973, 12, 31),
67
- )
68
-
69
- JapanComingOfAgeDay1974To1999 = Holiday(
70
- name="Coming of Age Day",
71
- month=1,
72
- day=15,
73
- start_date=Timestamp(1974, 1, 1),
74
- end_date=Timestamp(1999, 12, 31),
75
- observance=sunday_to_monday,
76
- )
77
-
78
- JapanComingOfAgeDay = Holiday( # second monday of january
79
- name="Coming of Age Day",
80
- month=1,
81
- day=1,
82
- start_date=Timestamp(2000, 1, 1),
83
- offset=DateOffset(weekday=MO(2)),
84
- )
85
-
86
- JapanNationalFoundationDay1969To1973 = Holiday(
87
- name="National Foundation Day",
88
- month=2,
89
- day=11,
90
- start_date=Timestamp(1969, 1, 1), # also held 1872 to 1948 as Kigen-setsu
91
- end_date=Timestamp(1973, 12, 31),
92
- )
93
-
94
- JapanNationalFoundationDay = Holiday(
95
- name="National Foundation Day",
96
- month=2,
97
- day=11,
98
- start_date=Timestamp(1974, 1, 1),
99
- observance=sunday_to_monday,
100
- )
101
-
102
- JapanEmperorsBirthday = Holiday(
103
- name="The Emperor's Birthday",
104
- month=2,
105
- day=23,
106
- start_date=Timestamp(2020, 1, 1),
107
- observance=sunday_to_monday,
108
- )
109
-
110
- JapanVernalEquinox = Holiday(
111
- name="Vernal Equinox", month=3, day=20, observance=vernal_equinox
112
- )
113
-
114
- JapanShowaDayUntil1972 = Holiday(
115
- name="Showa Day", month=4, day=29, end_date=Timestamp(1972, 12, 31) # 1965
116
- )
117
-
118
- JapanShowaDay = Holiday(
119
- name="Showa Day",
120
- month=4,
121
- day=29,
122
- start_date=Timestamp(1973, 1, 1),
123
- observance=sunday_to_monday,
124
- )
125
-
126
- JapanConstitutionMemorialDayUntil1972 = Holiday(
127
- name="Constitution Memorial Day",
128
- month=5,
129
- day=3,
130
- start_date=Timestamp(1948, 1, 1),
131
- end_date=Timestamp(1972, 12, 31),
132
- )
133
-
134
- JapanConstitutionMemorialDay = Holiday(
135
- name="Constitution Memorial Day",
136
- month=5,
137
- day=3,
138
- start_date=Timestamp(1973, 1, 1),
139
- observance=sunday_to_monday,
140
- )
141
-
142
- JapanGreeneryDay = Holiday(
143
- name="Greenery Day", # prior to 1985 was a Citizen's Day
144
- month=5,
145
- day=4,
146
- start_date=Timestamp(1985, 1, 1),
147
- observance=sunday_to_monday,
148
- )
149
-
150
- JapanChildrensDayUntil1972 = Holiday(
151
- name="Children's Day",
152
- month=5,
153
- day=5,
154
- start_date=Timestamp(1948, 1, 1),
155
- end_date=Timestamp(1972, 12, 31),
156
- )
157
-
158
- JapanChildrensDay = Holiday(
159
- name="Children's Day",
160
- month=5,
161
- day=5,
162
- start_date=Timestamp(1973, 1, 1),
163
- observance=sunday_to_monday,
164
- )
165
-
166
- # starting in 2007, there can be a holiday on May 6 if May 3 or 4 falls on a Sunday
167
- JapanGoldenWeekBonusDay = Holiday(
168
- name="Golden Week Bonus Day",
169
- month=5,
170
- day=6,
171
- start_date=Timestamp(2007, 1, 1),
172
- days_of_week=(1, 2),
173
- )
174
-
175
- JapanMarineDay1996To2002 = Holiday(
176
- name="Marine Day",
177
- month=7,
178
- day=20,
179
- start_date=Timestamp(1996, 1, 1),
180
- end_date=Timestamp(2002, 12, 31),
181
- observance=sunday_to_monday,
182
- )
183
-
184
- JapanMarineDay2003To2019 = Holiday(
185
- name="Marine Day",
186
- month=7,
187
- day=1,
188
- start_date=Timestamp(2003, 1, 1),
189
- end_date=Timestamp(2019, 12, 31),
190
- offset=DateOffset(weekday=MO(3)),
191
- )
192
-
193
- JapanMarineDay2020 = Holiday(
194
- name="Marine Day", # shift for Olympics
195
- year=2020,
196
- month=7,
197
- day=23,
198
- )
199
-
200
- JapanMarineDay2021 = Holiday(
201
- name="Marine Day", # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
202
- year=2021,
203
- month=7,
204
- day=22,
205
- )
206
-
207
- JapanMarineDay = Holiday(
208
- name="Marine Day",
209
- month=7,
210
- day=1,
211
- start_date=Timestamp(2022, 1, 1),
212
- offset=DateOffset(weekday=MO(3)),
213
- )
214
-
215
- JapanMountainDay2016to2019 = Holiday(
216
- name="Mountain Day",
217
- month=8,
218
- day=11,
219
- start_date=Timestamp(2016, 1, 1),
220
- end_date=Timestamp(2019, 12, 31),
221
- observance=sunday_to_monday,
222
- )
223
-
224
- JapanMountainDay2020 = Holiday(
225
- name="Mountain Day", # shift for Olympics
226
- year=2020,
227
- month=8,
228
- day=10,
229
- )
230
-
231
- JapanMountainDay2021 = Holiday(
232
- name="Mountain Day", # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
233
- year=2021,
234
- month=8,
235
- day=8,
236
- )
237
-
238
- JapanMountainDay2021NextDay = Holiday(
239
- name="Mountain Day", # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
240
- year=2021,
241
- month=8,
242
- day=9,
243
- )
244
-
245
- JapanMountainDay = Holiday(
246
- name="Mountain Day",
247
- month=8,
248
- day=11,
249
- start_date=Timestamp(2022, 1, 1),
250
- observance=sunday_to_monday,
251
- )
252
-
253
- JapanRespectForTheAgedDay1966To1972 = Holiday(
254
- name="Respect for the Aged Day",
255
- month=9,
256
- day=15,
257
- start_date=Timestamp(1966, 1, 1),
258
- end_date=Timestamp(1972, 12, 31),
259
- )
260
-
261
- JapanRespectForTheAgedDay1973To2002 = Holiday(
262
- name="Respect for the Aged Day",
263
- month=9,
264
- day=15,
265
- start_date=Timestamp(1973, 1, 1),
266
- end_date=Timestamp(2002, 12, 31),
267
- observance=sunday_to_monday,
268
- )
269
-
270
- JapanRespectForTheAgedDay = Holiday(
271
- name="Respect for the Aged Day",
272
- month=9,
273
- day=1,
274
- start_date=Timestamp(2003, 1, 1),
275
- offset=DateOffset(weekday=MO(3)),
276
- )
277
-
278
- # Citizen's Day added in some years between Respect for Aged and Autumnal Equinox
279
-
280
- JapanAutumnalEquinox = Holiday(
281
- name="Autumnal Equinox",
282
- month=9,
283
- day=22,
284
- observance=autumnal_equinox,
285
- )
286
-
287
- JapanHealthAndSportsDay1966To1972 = Holiday(
288
- name="Health and Sports Day",
289
- month=10,
290
- day=10,
291
- start_date=Timestamp(1966, 1, 1),
292
- end_date=Timestamp(1972, 12, 31),
293
- )
294
-
295
- JapanHealthAndSportsDay1973To1999 = Holiday(
296
- name="Health and Sports Day",
297
- month=10,
298
- day=10,
299
- start_date=Timestamp(1973, 1, 1),
300
- end_date=Timestamp(1999, 12, 31),
301
- observance=sunday_to_monday,
302
- )
303
-
304
- JapanHealthAndSportsDay2000To2019 = Holiday(
305
- name="Health and Sports Day",
306
- month=10,
307
- day=1,
308
- start_date=Timestamp(2000, 1, 1),
309
- end_date=Timestamp(2019, 12, 31),
310
- offset=DateOffset(weekday=MO(2)),
311
- )
312
-
313
- JapanSportsDay2020 = Holiday(
314
- name="Sports Day", # shift for Olympics
315
- year=2020,
316
- month=7,
317
- day=24,
318
- )
319
-
320
- JapanSportsDay2021 = Holiday(
321
- name="Sports Day", # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
322
- year=2021,
323
- month=7,
324
- day=23,
325
- )
326
-
327
- JapanSportsDay = Holiday(
328
- name="Sports Day",
329
- month=10,
330
- day=1,
331
- start_date=Timestamp(2022, 1, 1),
332
- offset=DateOffset(weekday=MO(2)),
333
- )
334
-
335
- JapanCultureDayUntil1972 = Holiday(
336
- name="Culture Day", # prior to 1948 Emperor Meiji's Birthday
337
- month=11,
338
- day=3,
339
- start_date=Timestamp(1948, 1, 1),
340
- end_date=Timestamp(1972, 12, 31),
341
- )
342
-
343
- JapanCultureDay = Holiday(
344
- name="Culture Day",
345
- month=11,
346
- day=3,
347
- start_date=Timestamp(1973, 1, 1),
348
- observance=sunday_to_monday,
349
- )
350
-
351
- JapanLaborThanksgivingDayUntil1972 = Holiday(
352
- name="Labor Thanksgiving Day", # prior to 1948 harvest festival Niiname-sai
353
- month=11,
354
- day=23,
355
- end_date=Timestamp(1972, 12, 31),
356
- )
357
-
358
- JapanLaborThanksgivingDay = Holiday(
359
- name="Labor Thanksgiving Day",
360
- month=11,
361
- day=23,
362
- start_date=Timestamp(1973, 1, 1),
363
- observance=sunday_to_monday,
364
- )
365
-
366
- JapanEmperorAkahitosBirthday = Holiday(
367
- name="Emperor Akahito's Birthday",
368
- month=12,
369
- day=23,
370
- start_date=Timestamp(1990, 1, 1),
371
- end_date=Timestamp(2018, 12, 31),
372
- observance=sunday_to_monday,
373
- )
374
-
375
- JapanDecember29Until1988 = Holiday(
376
- name="Closed Decenber 29",
377
- month=12,
378
- day=29,
379
- end_date=Timestamp(1988, 12, 31),
380
- )
381
-
382
- JapanDecember30Until1988 = Holiday(
383
- name="Closed December 30",
384
- month=12,
385
- day=30,
386
- end_date=Timestamp(1988, 12, 31),
387
- )
388
-
389
- JapanBeforeNewYearsDay = Holiday(
390
- name="Before New Year's Day", # prior to 1948 harvest festival Niname-sai
391
- month=12,
392
- day=31,
393
- observance=sunday_to_monday,
394
- )
1
+ from dateutil.relativedelta import MO
2
+ from pandas import DateOffset, Timestamp
3
+ from pandas.tseries.holiday import Holiday, sunday_to_monday
4
+
5
+ from pandas_market_calendars.holidays.jpx_equinox import (
6
+ autumnal_citizen_dates,
7
+ autumnal_equinox,
8
+ vernal_equinox,
9
+ )
10
+
11
+ AscensionDays = [
12
+ Timestamp("2019-04-30", tz="UTC"), # National Holiday
13
+ Timestamp("2019-05-01", tz="UTC"), # Ascension Day
14
+ Timestamp("2019-05-02", tz="UTC"), # National Holiday
15
+ ]
16
+
17
+ MarriageDays = [
18
+ Timestamp("1959-04-10", tz="UTC"), # Akihito
19
+ Timestamp("1993-06-09", tz="UTC"), # Naruhito
20
+ ]
21
+
22
+ FuneralShowa = [
23
+ Timestamp("1989-02-24", tz="UTC"),
24
+ ]
25
+
26
+ EnthronementDays = [
27
+ Timestamp("1990-11-12", tz="UTC"), # Akihito
28
+ Timestamp("2019-10-22", tz="UTC"), # Naruhito
29
+ ]
30
+
31
+ AutumnalCitizenDates = autumnal_citizen_dates()
32
+
33
+ NoN225IndexPrices = [
34
+ # source: https://indexes.nikkei.co.jp/en/nkave/archives/data
35
+ # TODO: determine if these dates were also national holidays
36
+ Timestamp("1951-02-15", tz="UTC"),
37
+ Timestamp("1953-02-09", tz="UTC"),
38
+ Timestamp("1954-10-26", tz="UTC"),
39
+ Timestamp("1959-04-10", tz="UTC"),
40
+ ]
41
+
42
+ EquityTradingSystemFailure = [
43
+ # The Failure of Equity Trading System on October 1, 2020
44
+ # source: https://www.jpx.co.jp/english/corporate/news/news-releases/0060/20201019-01.html
45
+ Timestamp("2020-10-01", tz="UTC"),
46
+ ]
47
+
48
+ JapanNewYearsDay2 = Holiday(
49
+ name="New Year's Day",
50
+ month=1,
51
+ day=2,
52
+ observance=sunday_to_monday,
53
+ )
54
+
55
+ JapanNewYearsDay3 = Holiday(
56
+ name="New Year's Day",
57
+ month=1,
58
+ day=3,
59
+ )
60
+
61
+ JapanComingOfAgeDay1951To1973 = Holiday(
62
+ name="Coming of Age Day",
63
+ month=1,
64
+ day=15,
65
+ start_date=Timestamp(1951, 1, 1),
66
+ end_date=Timestamp(1973, 12, 31),
67
+ )
68
+
69
+ JapanComingOfAgeDay1974To1999 = Holiday(
70
+ name="Coming of Age Day",
71
+ month=1,
72
+ day=15,
73
+ start_date=Timestamp(1974, 1, 1),
74
+ end_date=Timestamp(1999, 12, 31),
75
+ observance=sunday_to_monday,
76
+ )
77
+
78
+ JapanComingOfAgeDay = Holiday( # second monday of january
79
+ name="Coming of Age Day",
80
+ month=1,
81
+ day=1,
82
+ start_date=Timestamp(2000, 1, 1),
83
+ offset=DateOffset(weekday=MO(2)),
84
+ )
85
+
86
+ JapanNationalFoundationDay1969To1973 = Holiday(
87
+ name="National Foundation Day",
88
+ month=2,
89
+ day=11,
90
+ start_date=Timestamp(1969, 1, 1), # also held 1872 to 1948 as Kigen-setsu
91
+ end_date=Timestamp(1973, 12, 31),
92
+ )
93
+
94
+ JapanNationalFoundationDay = Holiday(
95
+ name="National Foundation Day",
96
+ month=2,
97
+ day=11,
98
+ start_date=Timestamp(1974, 1, 1),
99
+ observance=sunday_to_monday,
100
+ )
101
+
102
+ JapanEmperorsBirthday = Holiday(
103
+ name="The Emperor's Birthday",
104
+ month=2,
105
+ day=23,
106
+ start_date=Timestamp(2020, 1, 1),
107
+ observance=sunday_to_monday,
108
+ )
109
+
110
+ JapanVernalEquinox = Holiday(
111
+ name="Vernal Equinox", month=3, day=20, observance=vernal_equinox
112
+ )
113
+
114
+ JapanShowaDayUntil1972 = Holiday(
115
+ name="Showa Day", month=4, day=29, end_date=Timestamp(1972, 12, 31) # 1965
116
+ )
117
+
118
+ JapanShowaDay = Holiday(
119
+ name="Showa Day",
120
+ month=4,
121
+ day=29,
122
+ start_date=Timestamp(1973, 1, 1),
123
+ observance=sunday_to_monday,
124
+ )
125
+
126
+ JapanConstitutionMemorialDayUntil1972 = Holiday(
127
+ name="Constitution Memorial Day",
128
+ month=5,
129
+ day=3,
130
+ start_date=Timestamp(1948, 1, 1),
131
+ end_date=Timestamp(1972, 12, 31),
132
+ )
133
+
134
+ JapanConstitutionMemorialDay = Holiday(
135
+ name="Constitution Memorial Day",
136
+ month=5,
137
+ day=3,
138
+ start_date=Timestamp(1973, 1, 1),
139
+ observance=sunday_to_monday,
140
+ )
141
+
142
+ JapanGreeneryDay = Holiday(
143
+ name="Greenery Day", # prior to 1985 was a Citizen's Day
144
+ month=5,
145
+ day=4,
146
+ start_date=Timestamp(1985, 1, 1),
147
+ observance=sunday_to_monday,
148
+ )
149
+
150
+ JapanChildrensDayUntil1972 = Holiday(
151
+ name="Children's Day",
152
+ month=5,
153
+ day=5,
154
+ start_date=Timestamp(1948, 1, 1),
155
+ end_date=Timestamp(1972, 12, 31),
156
+ )
157
+
158
+ JapanChildrensDay = Holiday(
159
+ name="Children's Day",
160
+ month=5,
161
+ day=5,
162
+ start_date=Timestamp(1973, 1, 1),
163
+ observance=sunday_to_monday,
164
+ )
165
+
166
+ # starting in 2007, there can be a holiday on May 6 if May 3 or 4 falls on a Sunday
167
+ JapanGoldenWeekBonusDay = Holiday(
168
+ name="Golden Week Bonus Day",
169
+ month=5,
170
+ day=6,
171
+ start_date=Timestamp(2007, 1, 1),
172
+ days_of_week=(1, 2),
173
+ )
174
+
175
+ JapanMarineDay1996To2002 = Holiday(
176
+ name="Marine Day",
177
+ month=7,
178
+ day=20,
179
+ start_date=Timestamp(1996, 1, 1),
180
+ end_date=Timestamp(2002, 12, 31),
181
+ observance=sunday_to_monday,
182
+ )
183
+
184
+ JapanMarineDay2003To2019 = Holiday(
185
+ name="Marine Day",
186
+ month=7,
187
+ day=1,
188
+ start_date=Timestamp(2003, 1, 1),
189
+ end_date=Timestamp(2019, 12, 31),
190
+ offset=DateOffset(weekday=MO(3)),
191
+ )
192
+
193
+ JapanMarineDay2020 = Holiday(
194
+ name="Marine Day", # shift for Olympics
195
+ year=2020,
196
+ month=7,
197
+ day=23,
198
+ )
199
+
200
+ JapanMarineDay2021 = Holiday(
201
+ name="Marine Day",
202
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
203
+ year=2021,
204
+ month=7,
205
+ day=22,
206
+ )
207
+
208
+ JapanMarineDay = Holiday(
209
+ name="Marine Day",
210
+ month=7,
211
+ day=1,
212
+ start_date=Timestamp(2022, 1, 1),
213
+ offset=DateOffset(weekday=MO(3)),
214
+ )
215
+
216
+ JapanMountainDay2016to2019 = Holiday(
217
+ name="Mountain Day",
218
+ month=8,
219
+ day=11,
220
+ start_date=Timestamp(2016, 1, 1),
221
+ end_date=Timestamp(2019, 12, 31),
222
+ observance=sunday_to_monday,
223
+ )
224
+
225
+ JapanMountainDay2020 = Holiday(
226
+ name="Mountain Day", # shift for Olympics
227
+ year=2020,
228
+ month=8,
229
+ day=10,
230
+ )
231
+
232
+ JapanMountainDay2021 = Holiday(
233
+ name="Mountain Day",
234
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
235
+ year=2021,
236
+ month=8,
237
+ day=8,
238
+ )
239
+
240
+ JapanMountainDay2021NextDay = Holiday(
241
+ name="Mountain Day",
242
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
243
+ year=2021,
244
+ month=8,
245
+ day=9,
246
+ )
247
+
248
+ JapanMountainDay = Holiday(
249
+ name="Mountain Day",
250
+ month=8,
251
+ day=11,
252
+ start_date=Timestamp(2022, 1, 1),
253
+ observance=sunday_to_monday,
254
+ )
255
+
256
+ JapanRespectForTheAgedDay1966To1972 = Holiday(
257
+ name="Respect for the Aged Day",
258
+ month=9,
259
+ day=15,
260
+ start_date=Timestamp(1966, 1, 1),
261
+ end_date=Timestamp(1972, 12, 31),
262
+ )
263
+
264
+ JapanRespectForTheAgedDay1973To2002 = Holiday(
265
+ name="Respect for the Aged Day",
266
+ month=9,
267
+ day=15,
268
+ start_date=Timestamp(1973, 1, 1),
269
+ end_date=Timestamp(2002, 12, 31),
270
+ observance=sunday_to_monday,
271
+ )
272
+
273
+ JapanRespectForTheAgedDay = Holiday(
274
+ name="Respect for the Aged Day",
275
+ month=9,
276
+ day=1,
277
+ start_date=Timestamp(2003, 1, 1),
278
+ offset=DateOffset(weekday=MO(3)),
279
+ )
280
+
281
+ # Citizen's Day added in some years between Respect for Aged and Autumnal Equinox
282
+
283
+ JapanAutumnalEquinox = Holiday(
284
+ name="Autumnal Equinox",
285
+ month=9,
286
+ day=22,
287
+ observance=autumnal_equinox,
288
+ )
289
+
290
+ JapanHealthAndSportsDay1966To1972 = Holiday(
291
+ name="Health and Sports Day",
292
+ month=10,
293
+ day=10,
294
+ start_date=Timestamp(1966, 1, 1),
295
+ end_date=Timestamp(1972, 12, 31),
296
+ )
297
+
298
+ JapanHealthAndSportsDay1973To1999 = Holiday(
299
+ name="Health and Sports Day",
300
+ month=10,
301
+ day=10,
302
+ start_date=Timestamp(1973, 1, 1),
303
+ end_date=Timestamp(1999, 12, 31),
304
+ observance=sunday_to_monday,
305
+ )
306
+
307
+ JapanHealthAndSportsDay2000To2019 = Holiday(
308
+ name="Health and Sports Day",
309
+ month=10,
310
+ day=1,
311
+ start_date=Timestamp(2000, 1, 1),
312
+ end_date=Timestamp(2019, 12, 31),
313
+ offset=DateOffset(weekday=MO(2)),
314
+ )
315
+
316
+ JapanSportsDay2020 = Holiday(
317
+ name="Sports Day", # shift for Olympics
318
+ year=2020,
319
+ month=7,
320
+ day=24,
321
+ )
322
+
323
+ JapanSportsDay2021 = Holiday(
324
+ name="Sports Day",
325
+ # shift for Olympics (Olympics and Paralympics postponed until 2021 due to the COVID-19 pandemic)
326
+ year=2021,
327
+ month=7,
328
+ day=23,
329
+ )
330
+
331
+ JapanSportsDay = Holiday(
332
+ name="Sports Day",
333
+ month=10,
334
+ day=1,
335
+ start_date=Timestamp(2022, 1, 1),
336
+ offset=DateOffset(weekday=MO(2)),
337
+ )
338
+
339
+ JapanCultureDayUntil1972 = Holiday(
340
+ name="Culture Day", # prior to 1948 Emperor Meiji's Birthday
341
+ month=11,
342
+ day=3,
343
+ start_date=Timestamp(1948, 1, 1),
344
+ end_date=Timestamp(1972, 12, 31),
345
+ )
346
+
347
+ JapanCultureDay = Holiday(
348
+ name="Culture Day",
349
+ month=11,
350
+ day=3,
351
+ start_date=Timestamp(1973, 1, 1),
352
+ observance=sunday_to_monday,
353
+ )
354
+
355
+ JapanLaborThanksgivingDayUntil1972 = Holiday(
356
+ name="Labor Thanksgiving Day", # prior to 1948 harvest festival Niiname-sai
357
+ month=11,
358
+ day=23,
359
+ end_date=Timestamp(1972, 12, 31),
360
+ )
361
+
362
+ JapanLaborThanksgivingDay = Holiday(
363
+ name="Labor Thanksgiving Day",
364
+ month=11,
365
+ day=23,
366
+ start_date=Timestamp(1973, 1, 1),
367
+ observance=sunday_to_monday,
368
+ )
369
+
370
+ JapanEmperorAkahitosBirthday = Holiday(
371
+ name="Emperor Akahito's Birthday",
372
+ month=12,
373
+ day=23,
374
+ start_date=Timestamp(1990, 1, 1),
375
+ end_date=Timestamp(2018, 12, 31),
376
+ observance=sunday_to_monday,
377
+ )
378
+
379
+ JapanDecember29Until1988 = Holiday(
380
+ name="Closed Decenber 29",
381
+ month=12,
382
+ day=29,
383
+ end_date=Timestamp(1988, 12, 31),
384
+ )
385
+
386
+ JapanDecember30Until1988 = Holiday(
387
+ name="Closed December 30",
388
+ month=12,
389
+ day=30,
390
+ end_date=Timestamp(1988, 12, 31),
391
+ )
392
+
393
+ JapanBeforeNewYearsDay = Holiday(
394
+ name="Before New Year's Day", # prior to 1948 harvest festival Niname-sai
395
+ month=12,
396
+ day=31,
397
+ observance=sunday_to_monday,
398
+ )