Skip to content

Commit 79a4c2c

Browse files
XTAI: Add missing holidays (#516)
* XTAI: Add missing holidays * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add test --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3e1acbd commit 79a4c2c

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

exchange_calendars/exchange_calendar_xtai.py

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,12 @@ def bridge_fri(
189189
return dt if (dt.weekday() == FRIDAY and checker(dt)) else None
190190

191191

192-
NewYearsDay = new_years_day(observance=nearest_weekday_from_2014)
193-
NewYearsDayExtraMon = new_years_day(observance=bridge_mon)
194-
NewYearsDayExtraFri = new_years_day(observance=bridge_fri)
195-
196192
bridge_mon_2014_thr_2023 = partial(bridge_mon, checker=check_between_2013_2024)
197193
bridge_fri_2014_thr_2023 = partial(bridge_fri, checker=check_between_2013_2024)
198194

195+
NewYearsDay = new_years_day(observance=nearest_weekday_from_2014)
196+
NewYearsDayExtraMon = new_years_day(observance=bridge_mon)
197+
NewYearsDayExtraFri = new_years_day(observance=bridge_fri_2014_thr_2023)
199198

200199
PeaceMemorialDay = Holiday(
201200
"Peace Memorial Day", month=2, day=28, observance=nearest_weekday_from_2014
@@ -237,7 +236,11 @@ def bridge_fri(
237236
)
238237

239238

240-
LabourDay = european_labour_day(observance=nearest_weekday_2014_thr_2023)
239+
LabourDay = european_labour_day(observance=nearest_weekday_from_2014)
240+
241+
TeachersDay = Holiday(
242+
"Teachers' Day", month=9, day=28, start_date="2025", observance=nearest_workday
243+
)
241244

242245
NationalDay = Holiday(
243246
"National Day of the Republic of China",
@@ -258,6 +261,20 @@ def bridge_fri(
258261
observance=bridge_fri_2014_thr_2023,
259262
)
260263

264+
TaiwanRestorationDay = Holiday(
265+
"Taiwan Restoration Day",
266+
month=10,
267+
day=25,
268+
start_date="2025",
269+
observance=nearest_workday,
270+
)
271+
272+
ConstitutionDay = Holiday(
273+
"Constitution Day",
274+
month=12,
275+
day=25,
276+
start_date="2025",
277+
)
261278

262279
chinese_new_year = chinese_new_year_offset(chinese_lunar_new_year_dates)
263280

@@ -342,12 +359,14 @@ def bridge_fri(
342359
"2024-02-07",
343360
"2025-01-23",
344361
"2025-01-24",
362+
"2026-02-20",
345363
]
346364
)
347365

348366
# Some abnormal observances of regularly observed holidays.
349367
extra_holidays = pd.to_datetime(
350368
[
369+
"2026-02-12", # No trading
351370
"2021-04-02", # Women And Childrens Day
352371
"2020-04-02", # Tomb Sweeping Day
353372
"2016-04-05", # Tomb Sweeping Day
@@ -439,9 +458,12 @@ def regular_holidays(self):
439458
WomenAndChildrensDayExtraMon,
440459
WomenAndChildrensDayExtraFri,
441460
LabourDay,
461+
TeachersDay,
442462
NationalDay,
443463
NationalDayExtraMon,
444464
NationalDayExtraFri,
465+
TaiwanRestorationDay,
466+
ConstitutionDay,
445467
]
446468
)
447469

tests/resources/xtai.csv

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29178,7 +29178,6 @@
2917829178
2025-09-24T00:00:00Z,2025-09-24T01:00:00Z,2025-09-24T05:30:00Z,,
2917929179
2025-09-25T00:00:00Z,2025-09-25T01:00:00Z,2025-09-25T05:30:00Z,,
2918029180
2025-09-26T00:00:00Z,2025-09-26T01:00:00Z,2025-09-26T05:30:00Z,,
29181-
2025-09-29T00:00:00Z,2025-09-29T01:00:00Z,2025-09-29T05:30:00Z,,
2918229181
2025-09-30T00:00:00Z,2025-09-30T01:00:00Z,2025-09-30T05:30:00Z,,
2918329182
2025-10-01T00:00:00Z,2025-10-01T01:00:00Z,2025-10-01T05:30:00Z,,
2918429183
2025-10-02T00:00:00Z,2025-10-02T01:00:00Z,2025-10-02T05:30:00Z,,
@@ -29195,7 +29194,6 @@
2919529194
2025-10-21T00:00:00Z,2025-10-21T01:00:00Z,2025-10-21T05:30:00Z,,
2919629195
2025-10-22T00:00:00Z,2025-10-22T01:00:00Z,2025-10-22T05:30:00Z,,
2919729196
2025-10-23T00:00:00Z,2025-10-23T01:00:00Z,2025-10-23T05:30:00Z,,
29198-
2025-10-24T00:00:00Z,2025-10-24T01:00:00Z,2025-10-24T05:30:00Z,,
2919929197
2025-10-27T00:00:00Z,2025-10-27T01:00:00Z,2025-10-27T05:30:00Z,,
2920029198
2025-10-28T00:00:00Z,2025-10-28T01:00:00Z,2025-10-28T05:30:00Z,,
2920129199
2025-10-29T00:00:00Z,2025-10-29T01:00:00Z,2025-10-29T05:30:00Z,,
@@ -29239,11 +29237,11 @@
2923929237
2025-12-22T00:00:00Z,2025-12-22T01:00:00Z,2025-12-22T05:30:00Z,,
2924029238
2025-12-23T00:00:00Z,2025-12-23T01:00:00Z,2025-12-23T05:30:00Z,,
2924129239
2025-12-24T00:00:00Z,2025-12-24T01:00:00Z,2025-12-24T05:30:00Z,,
29242-
2025-12-25T00:00:00Z,2025-12-25T01:00:00Z,2025-12-25T05:30:00Z,,
2924329240
2025-12-26T00:00:00Z,2025-12-26T01:00:00Z,2025-12-26T05:30:00Z,,
2924429241
2025-12-29T00:00:00Z,2025-12-29T01:00:00Z,2025-12-29T05:30:00Z,,
2924529242
2025-12-30T00:00:00Z,2025-12-30T01:00:00Z,2025-12-30T05:30:00Z,,
2924629243
2025-12-31T00:00:00Z,2025-12-31T01:00:00Z,2025-12-31T05:30:00Z,,
29244+
2026-01-02T00:00:00Z,2026-01-02T01:00:00Z,2026-01-02T05:30:00Z,,
2924729245
2026-01-05T00:00:00Z,2026-01-05T01:00:00Z,2026-01-05T05:30:00Z,,
2924829246
2026-01-06T00:00:00Z,2026-01-06T01:00:00Z,2026-01-06T05:30:00Z,,
2924929247
2026-01-07T00:00:00Z,2026-01-07T01:00:00Z,2026-01-07T05:30:00Z,,
@@ -29272,8 +29270,6 @@
2927229270
2026-02-09T00:00:00Z,2026-02-09T01:00:00Z,2026-02-09T05:30:00Z,,
2927329271
2026-02-10T00:00:00Z,2026-02-10T01:00:00Z,2026-02-10T05:30:00Z,,
2927429272
2026-02-11T00:00:00Z,2026-02-11T01:00:00Z,2026-02-11T05:30:00Z,,
29275-
2026-02-12T00:00:00Z,2026-02-12T01:00:00Z,2026-02-12T05:30:00Z,,
29276-
2026-02-20T00:00:00Z,2026-02-20T01:00:00Z,2026-02-20T05:30:00Z,,
2927729273
2026-02-23T00:00:00Z,2026-02-23T01:00:00Z,2026-02-23T05:30:00Z,,
2927829274
2026-02-24T00:00:00Z,2026-02-24T01:00:00Z,2026-02-24T05:30:00Z,,
2927929275
2026-02-25T00:00:00Z,2026-02-25T01:00:00Z,2026-02-25T05:30:00Z,,
@@ -29423,7 +29419,6 @@
2942329419
2026-09-22T00:00:00Z,2026-09-22T01:00:00Z,2026-09-22T05:30:00Z,,
2942429420
2026-09-23T00:00:00Z,2026-09-23T01:00:00Z,2026-09-23T05:30:00Z,,
2942529421
2026-09-24T00:00:00Z,2026-09-24T01:00:00Z,2026-09-24T05:30:00Z,,
29426-
2026-09-28T00:00:00Z,2026-09-28T01:00:00Z,2026-09-28T05:30:00Z,,
2942729422
2026-09-29T00:00:00Z,2026-09-29T01:00:00Z,2026-09-29T05:30:00Z,,
2942829423
2026-09-30T00:00:00Z,2026-09-30T01:00:00Z,2026-09-30T05:30:00Z,,
2942929424
2026-10-01T00:00:00Z,2026-10-01T01:00:00Z,2026-10-01T05:30:00Z,,
@@ -29442,7 +29437,6 @@
2944229437
2026-10-21T00:00:00Z,2026-10-21T01:00:00Z,2026-10-21T05:30:00Z,,
2944329438
2026-10-22T00:00:00Z,2026-10-22T01:00:00Z,2026-10-22T05:30:00Z,,
2944429439
2026-10-23T00:00:00Z,2026-10-23T01:00:00Z,2026-10-23T05:30:00Z,,
29445-
2026-10-26T00:00:00Z,2026-10-26T01:00:00Z,2026-10-26T05:30:00Z,,
2944629440
2026-10-27T00:00:00Z,2026-10-27T01:00:00Z,2026-10-27T05:30:00Z,,
2944729441
2026-10-28T00:00:00Z,2026-10-28T01:00:00Z,2026-10-28T05:30:00Z,,
2944829442
2026-10-29T00:00:00Z,2026-10-29T01:00:00Z,2026-10-29T05:30:00Z,,
@@ -29486,7 +29480,6 @@
2948629480
2026-12-22T00:00:00Z,2026-12-22T01:00:00Z,2026-12-22T05:30:00Z,,
2948729481
2026-12-23T00:00:00Z,2026-12-23T01:00:00Z,2026-12-23T05:30:00Z,,
2948829482
2026-12-24T00:00:00Z,2026-12-24T01:00:00Z,2026-12-24T05:30:00Z,,
29489-
2026-12-25T00:00:00Z,2026-12-25T01:00:00Z,2026-12-25T05:30:00Z,,
2949029483
2026-12-28T00:00:00Z,2026-12-28T01:00:00Z,2026-12-28T05:30:00Z,,
2949129484
2026-12-29T00:00:00Z,2026-12-29T01:00:00Z,2026-12-29T05:30:00Z,,
2949229485
2026-12-30T00:00:00Z,2026-12-30T01:00:00Z,2026-12-30T05:30:00Z,,
@@ -29568,7 +29561,6 @@
2956829561
2027-04-27T00:00:00Z,2027-04-27T01:00:00Z,2027-04-27T05:30:00Z,,
2956929562
2027-04-28T00:00:00Z,2027-04-28T01:00:00Z,2027-04-28T05:30:00Z,,
2957029563
2027-04-29T00:00:00Z,2027-04-29T01:00:00Z,2027-04-29T05:30:00Z,,
29571-
2027-04-30T00:00:00Z,2027-04-30T01:00:00Z,2027-04-30T05:30:00Z,,
2957229564
2027-05-03T00:00:00Z,2027-05-03T01:00:00Z,2027-05-03T05:30:00Z,,
2957329565
2027-05-04T00:00:00Z,2027-05-04T01:00:00Z,2027-05-04T05:30:00Z,,
2957429566
2027-05-05T00:00:00Z,2027-05-05T01:00:00Z,2027-05-05T05:30:00Z,,
@@ -29673,7 +29665,6 @@
2967329665
2027-09-23T00:00:00Z,2027-09-23T01:00:00Z,2027-09-23T05:30:00Z,,
2967429666
2027-09-24T00:00:00Z,2027-09-24T01:00:00Z,2027-09-24T05:30:00Z,,
2967529667
2027-09-27T00:00:00Z,2027-09-27T01:00:00Z,2027-09-27T05:30:00Z,,
29676-
2027-09-28T00:00:00Z,2027-09-28T01:00:00Z,2027-09-28T05:30:00Z,,
2967729668
2027-09-29T00:00:00Z,2027-09-29T01:00:00Z,2027-09-29T05:30:00Z,,
2967829669
2027-09-30T00:00:00Z,2027-09-30T01:00:00Z,2027-09-30T05:30:00Z,,
2967929670
2027-10-01T00:00:00Z,2027-10-01T01:00:00Z,2027-10-01T05:30:00Z,,
@@ -29691,7 +29682,6 @@
2969129682
2027-10-20T00:00:00Z,2027-10-20T01:00:00Z,2027-10-20T05:30:00Z,,
2969229683
2027-10-21T00:00:00Z,2027-10-21T01:00:00Z,2027-10-21T05:30:00Z,,
2969329684
2027-10-22T00:00:00Z,2027-10-22T01:00:00Z,2027-10-22T05:30:00Z,,
29694-
2027-10-25T00:00:00Z,2027-10-25T01:00:00Z,2027-10-25T05:30:00Z,,
2969529685
2027-10-26T00:00:00Z,2027-10-26T01:00:00Z,2027-10-26T05:30:00Z,,
2969629686
2027-10-27T00:00:00Z,2027-10-27T01:00:00Z,2027-10-27T05:30:00Z,,
2969729687
2027-10-28T00:00:00Z,2027-10-28T01:00:00Z,2027-10-28T05:30:00Z,,
@@ -29923,7 +29913,6 @@
2992329913
2028-09-25T00:00:00Z,2028-09-25T01:00:00Z,2028-09-25T05:30:00Z,,
2992429914
2028-09-26T00:00:00Z,2028-09-26T01:00:00Z,2028-09-26T05:30:00Z,,
2992529915
2028-09-27T00:00:00Z,2028-09-27T01:00:00Z,2028-09-27T05:30:00Z,,
29926-
2028-09-28T00:00:00Z,2028-09-28T01:00:00Z,2028-09-28T05:30:00Z,,
2992729916
2028-09-29T00:00:00Z,2028-09-29T01:00:00Z,2028-09-29T05:30:00Z,,
2992829917
2028-10-02T00:00:00Z,2028-10-02T01:00:00Z,2028-10-02T05:30:00Z,,
2992929918
2028-10-04T00:00:00Z,2028-10-04T01:00:00Z,2028-10-04T05:30:00Z,,
@@ -29940,7 +29929,6 @@
2994029929
2028-10-20T00:00:00Z,2028-10-20T01:00:00Z,2028-10-20T05:30:00Z,,
2994129930
2028-10-23T00:00:00Z,2028-10-23T01:00:00Z,2028-10-23T05:30:00Z,,
2994229931
2028-10-24T00:00:00Z,2028-10-24T01:00:00Z,2028-10-24T05:30:00Z,,
29943-
2028-10-25T00:00:00Z,2028-10-25T01:00:00Z,2028-10-25T05:30:00Z,,
2994429932
2028-10-26T00:00:00Z,2028-10-26T01:00:00Z,2028-10-26T05:30:00Z,,
2994529933
2028-10-27T00:00:00Z,2028-10-27T01:00:00Z,2028-10-27T05:30:00Z,,
2994629934
2028-10-30T00:00:00Z,2028-10-30T01:00:00Z,2028-10-30T05:30:00Z,,
@@ -29983,7 +29971,6 @@
2998329971
2028-12-20T00:00:00Z,2028-12-20T01:00:00Z,2028-12-20T05:30:00Z,,
2998429972
2028-12-21T00:00:00Z,2028-12-21T01:00:00Z,2028-12-21T05:30:00Z,,
2998529973
2028-12-22T00:00:00Z,2028-12-22T01:00:00Z,2028-12-22T05:30:00Z,,
29986-
2028-12-25T00:00:00Z,2028-12-25T01:00:00Z,2028-12-25T05:30:00Z,,
2998729974
2028-12-26T00:00:00Z,2028-12-26T01:00:00Z,2028-12-26T05:30:00Z,,
2998829975
2028-12-27T00:00:00Z,2028-12-27T01:00:00Z,2028-12-27T05:30:00Z,,
2998929976
2028-12-28T00:00:00Z,2028-12-28T01:00:00Z,2028-12-28T05:30:00Z,,
@@ -30170,7 +30157,6 @@
3017030157
2029-09-25T00:00:00Z,2029-09-25T01:00:00Z,2029-09-25T05:30:00Z,,
3017130158
2029-09-26T00:00:00Z,2029-09-26T01:00:00Z,2029-09-26T05:30:00Z,,
3017230159
2029-09-27T00:00:00Z,2029-09-27T01:00:00Z,2029-09-27T05:30:00Z,,
30173-
2029-09-28T00:00:00Z,2029-09-28T01:00:00Z,2029-09-28T05:30:00Z,,
3017430160
2029-10-01T00:00:00Z,2029-10-01T01:00:00Z,2029-10-01T05:30:00Z,,
3017530161
2029-10-02T00:00:00Z,2029-10-02T01:00:00Z,2029-10-02T05:30:00Z,,
3017630162
2029-10-03T00:00:00Z,2029-10-03T01:00:00Z,2029-10-03T05:30:00Z,,
@@ -30188,7 +30174,6 @@
3018830174
2029-10-22T00:00:00Z,2029-10-22T01:00:00Z,2029-10-22T05:30:00Z,,
3018930175
2029-10-23T00:00:00Z,2029-10-23T01:00:00Z,2029-10-23T05:30:00Z,,
3019030176
2029-10-24T00:00:00Z,2029-10-24T01:00:00Z,2029-10-24T05:30:00Z,,
30191-
2029-10-25T00:00:00Z,2029-10-25T01:00:00Z,2029-10-25T05:30:00Z,,
3019230177
2029-10-26T00:00:00Z,2029-10-26T01:00:00Z,2029-10-26T05:30:00Z,,
3019330178
2029-10-29T00:00:00Z,2029-10-29T01:00:00Z,2029-10-29T05:30:00Z,,
3019430179
2029-10-30T00:00:00Z,2029-10-30T01:00:00Z,2029-10-30T05:30:00Z,,
@@ -30231,7 +30216,6 @@
3023130216
2029-12-20T00:00:00Z,2029-12-20T01:00:00Z,2029-12-20T05:30:00Z,,
3023230217
2029-12-21T00:00:00Z,2029-12-21T01:00:00Z,2029-12-21T05:30:00Z,,
3023330218
2029-12-24T00:00:00Z,2029-12-24T01:00:00Z,2029-12-24T05:30:00Z,,
30234-
2029-12-25T00:00:00Z,2029-12-25T01:00:00Z,2029-12-25T05:30:00Z,,
3023530219
2029-12-26T00:00:00Z,2029-12-26T01:00:00Z,2029-12-26T05:30:00Z,,
3023630220
2029-12-27T00:00:00Z,2029-12-27T01:00:00Z,2029-12-27T05:30:00Z,,
3023730221
2029-12-28T00:00:00Z,2029-12-28T01:00:00Z,2029-12-28T05:30:00Z,,
@@ -30416,7 +30400,6 @@
3041630400
2030-09-24T00:00:00Z,2030-09-24T01:00:00Z,2030-09-24T05:30:00Z,,
3041730401
2030-09-25T00:00:00Z,2030-09-25T01:00:00Z,2030-09-25T05:30:00Z,,
3041830402
2030-09-26T00:00:00Z,2030-09-26T01:00:00Z,2030-09-26T05:30:00Z,,
30419-
2030-09-27T00:00:00Z,2030-09-27T01:00:00Z,2030-09-27T05:30:00Z,,
3042030403
2030-09-30T00:00:00Z,2030-09-30T01:00:00Z,2030-09-30T05:30:00Z,,
3042130404
2030-10-01T00:00:00Z,2030-10-01T01:00:00Z,2030-10-01T05:30:00Z,,
3042230405
2030-10-02T00:00:00Z,2030-10-02T01:00:00Z,2030-10-02T05:30:00Z,,
@@ -30435,7 +30418,6 @@
3043530418
2030-10-22T00:00:00Z,2030-10-22T01:00:00Z,2030-10-22T05:30:00Z,,
3043630419
2030-10-23T00:00:00Z,2030-10-23T01:00:00Z,2030-10-23T05:30:00Z,,
3043730420
2030-10-24T00:00:00Z,2030-10-24T01:00:00Z,2030-10-24T05:30:00Z,,
30438-
2030-10-25T00:00:00Z,2030-10-25T01:00:00Z,2030-10-25T05:30:00Z,,
3043930421
2030-10-28T00:00:00Z,2030-10-28T01:00:00Z,2030-10-28T05:30:00Z,,
3044030422
2030-10-29T00:00:00Z,2030-10-29T01:00:00Z,2030-10-29T05:30:00Z,,
3044130423
2030-10-30T00:00:00Z,2030-10-30T01:00:00Z,2030-10-30T05:30:00Z,,
@@ -30478,7 +30460,6 @@
3047830460
2030-12-20T00:00:00Z,2030-12-20T01:00:00Z,2030-12-20T05:30:00Z,,
3047930461
2030-12-23T00:00:00Z,2030-12-23T01:00:00Z,2030-12-23T05:30:00Z,,
3048030462
2030-12-24T00:00:00Z,2030-12-24T01:00:00Z,2030-12-24T05:30:00Z,,
30481-
2030-12-25T00:00:00Z,2030-12-25T01:00:00Z,2030-12-25T05:30:00Z,,
3048230463
2030-12-26T00:00:00Z,2030-12-26T01:00:00Z,2030-12-26T05:30:00Z,,
3048330464
2030-12-27T00:00:00Z,2030-12-27T01:00:00Z,2030-12-27T05:30:00Z,,
3048430465
2030-12-30T00:00:00Z,2030-12-30T01:00:00Z,2030-12-30T05:30:00Z,,
@@ -30666,7 +30647,6 @@
3066630647
2031-09-24T00:00:00Z,2031-09-24T01:00:00Z,2031-09-24T05:30:00Z,,
3066730648
2031-09-25T00:00:00Z,2031-09-25T01:00:00Z,2031-09-25T05:30:00Z,,
3066830649
2031-09-26T00:00:00Z,2031-09-26T01:00:00Z,2031-09-26T05:30:00Z,,
30669-
2031-09-29T00:00:00Z,2031-09-29T01:00:00Z,2031-09-29T05:30:00Z,,
3067030650
2031-09-30T00:00:00Z,2031-09-30T01:00:00Z,2031-09-30T05:30:00Z,,
3067130651
2031-10-02T00:00:00Z,2031-10-02T01:00:00Z,2031-10-02T05:30:00Z,,
3067230652
2031-10-03T00:00:00Z,2031-10-03T01:00:00Z,2031-10-03T05:30:00Z,,
@@ -30683,7 +30663,6 @@
3068330663
2031-10-21T00:00:00Z,2031-10-21T01:00:00Z,2031-10-21T05:30:00Z,,
3068430664
2031-10-22T00:00:00Z,2031-10-22T01:00:00Z,2031-10-22T05:30:00Z,,
3068530665
2031-10-23T00:00:00Z,2031-10-23T01:00:00Z,2031-10-23T05:30:00Z,,
30686-
2031-10-24T00:00:00Z,2031-10-24T01:00:00Z,2031-10-24T05:30:00Z,,
3068730666
2031-10-27T00:00:00Z,2031-10-27T01:00:00Z,2031-10-27T05:30:00Z,,
3068830667
2031-10-28T00:00:00Z,2031-10-28T01:00:00Z,2031-10-28T05:30:00Z,,
3068930668
2031-10-29T00:00:00Z,2031-10-29T01:00:00Z,2031-10-29T05:30:00Z,,
@@ -30727,11 +30706,11 @@
3072730706
2031-12-22T00:00:00Z,2031-12-22T01:00:00Z,2031-12-22T05:30:00Z,,
3072830707
2031-12-23T00:00:00Z,2031-12-23T01:00:00Z,2031-12-23T05:30:00Z,,
3072930708
2031-12-24T00:00:00Z,2031-12-24T01:00:00Z,2031-12-24T05:30:00Z,,
30730-
2031-12-25T00:00:00Z,2031-12-25T01:00:00Z,2031-12-25T05:30:00Z,,
3073130709
2031-12-26T00:00:00Z,2031-12-26T01:00:00Z,2031-12-26T05:30:00Z,,
3073230710
2031-12-29T00:00:00Z,2031-12-29T01:00:00Z,2031-12-29T05:30:00Z,,
3073330711
2031-12-30T00:00:00Z,2031-12-30T01:00:00Z,2031-12-30T05:30:00Z,,
3073430712
2031-12-31T00:00:00Z,2031-12-31T01:00:00Z,2031-12-31T05:30:00Z,,
30713+
2032-01-02T00:00:00Z,2032-01-02T01:00:00Z,2032-01-02T05:30:00Z,,
3073530714
2032-01-05T00:00:00Z,2032-01-05T01:00:00Z,2032-01-05T05:30:00Z,,
3073630715
2032-01-06T00:00:00Z,2032-01-06T01:00:00Z,2032-01-06T05:30:00Z,,
3073730716
2032-01-07T00:00:00Z,2032-01-07T01:00:00Z,2032-01-07T05:30:00Z,,
@@ -30809,7 +30788,6 @@
3080930788
2032-04-27T00:00:00Z,2032-04-27T01:00:00Z,2032-04-27T05:30:00Z,,
3081030789
2032-04-28T00:00:00Z,2032-04-28T01:00:00Z,2032-04-28T05:30:00Z,,
3081130790
2032-04-29T00:00:00Z,2032-04-29T01:00:00Z,2032-04-29T05:30:00Z,,
30812-
2032-04-30T00:00:00Z,2032-04-30T01:00:00Z,2032-04-30T05:30:00Z,,
3081330791
2032-05-03T00:00:00Z,2032-05-03T01:00:00Z,2032-05-03T05:30:00Z,,
3081430792
2032-05-04T00:00:00Z,2032-05-04T01:00:00Z,2032-05-04T05:30:00Z,,
3081530793
2032-05-05T00:00:00Z,2032-05-05T01:00:00Z,2032-05-05T05:30:00Z,,
@@ -30914,7 +30892,6 @@
3091430892
2032-09-23T00:00:00Z,2032-09-23T01:00:00Z,2032-09-23T05:30:00Z,,
3091530893
2032-09-24T00:00:00Z,2032-09-24T01:00:00Z,2032-09-24T05:30:00Z,,
3091630894
2032-09-27T00:00:00Z,2032-09-27T01:00:00Z,2032-09-27T05:30:00Z,,
30917-
2032-09-28T00:00:00Z,2032-09-28T01:00:00Z,2032-09-28T05:30:00Z,,
3091830895
2032-09-29T00:00:00Z,2032-09-29T01:00:00Z,2032-09-29T05:30:00Z,,
3091930896
2032-09-30T00:00:00Z,2032-09-30T01:00:00Z,2032-09-30T05:30:00Z,,
3092030897
2032-10-01T00:00:00Z,2032-10-01T01:00:00Z,2032-10-01T05:30:00Z,,
@@ -30932,7 +30909,6 @@
3093230909
2032-10-20T00:00:00Z,2032-10-20T01:00:00Z,2032-10-20T05:30:00Z,,
3093330910
2032-10-21T00:00:00Z,2032-10-21T01:00:00Z,2032-10-21T05:30:00Z,,
3093430911
2032-10-22T00:00:00Z,2032-10-22T01:00:00Z,2032-10-22T05:30:00Z,,
30935-
2032-10-25T00:00:00Z,2032-10-25T01:00:00Z,2032-10-25T05:30:00Z,,
3093630912
2032-10-26T00:00:00Z,2032-10-26T01:00:00Z,2032-10-26T05:30:00Z,,
3093730913
2032-10-27T00:00:00Z,2032-10-27T01:00:00Z,2032-10-27T05:30:00Z,,
3093830914
2032-10-28T00:00:00Z,2032-10-28T01:00:00Z,2032-10-28T05:30:00Z,,
@@ -31059,7 +31035,6 @@
3105931035
2033-04-27T00:00:00Z,2033-04-27T01:00:00Z,2033-04-27T05:30:00Z,,
3106031036
2033-04-28T00:00:00Z,2033-04-28T01:00:00Z,2033-04-28T05:30:00Z,,
3106131037
2033-04-29T00:00:00Z,2033-04-29T01:00:00Z,2033-04-29T05:30:00Z,,
31062-
2033-05-02T00:00:00Z,2033-05-02T01:00:00Z,2033-05-02T05:30:00Z,,
3106331038
2033-05-03T00:00:00Z,2033-05-03T01:00:00Z,2033-05-03T05:30:00Z,,
3106431039
2033-05-04T00:00:00Z,2033-05-04T01:00:00Z,2033-05-04T05:30:00Z,,
3106531040
2033-05-05T00:00:00Z,2033-05-05T01:00:00Z,2033-05-05T05:30:00Z,,
@@ -31164,7 +31139,6 @@
3116431139
2033-09-23T00:00:00Z,2033-09-23T01:00:00Z,2033-09-23T05:30:00Z,,
3116531140
2033-09-26T00:00:00Z,2033-09-26T01:00:00Z,2033-09-26T05:30:00Z,,
3116631141
2033-09-27T00:00:00Z,2033-09-27T01:00:00Z,2033-09-27T05:30:00Z,,
31167-
2033-09-28T00:00:00Z,2033-09-28T01:00:00Z,2033-09-28T05:30:00Z,,
3116831142
2033-09-29T00:00:00Z,2033-09-29T01:00:00Z,2033-09-29T05:30:00Z,,
3116931143
2033-09-30T00:00:00Z,2033-09-30T01:00:00Z,2033-09-30T05:30:00Z,,
3117031144
2033-10-03T00:00:00Z,2033-10-03T01:00:00Z,2033-10-03T05:30:00Z,,
@@ -31182,7 +31156,6 @@
3118231156
2033-10-20T00:00:00Z,2033-10-20T01:00:00Z,2033-10-20T05:30:00Z,,
3118331157
2033-10-21T00:00:00Z,2033-10-21T01:00:00Z,2033-10-21T05:30:00Z,,
3118431158
2033-10-24T00:00:00Z,2033-10-24T01:00:00Z,2033-10-24T05:30:00Z,,
31185-
2033-10-25T00:00:00Z,2033-10-25T01:00:00Z,2033-10-25T05:30:00Z,,
3118631159
2033-10-26T00:00:00Z,2033-10-26T01:00:00Z,2033-10-26T05:30:00Z,,
3118731160
2033-10-27T00:00:00Z,2033-10-27T01:00:00Z,2033-10-27T05:30:00Z,,
3118831161
2033-10-28T00:00:00Z,2033-10-28T01:00:00Z,2033-10-28T05:30:00Z,,
@@ -31412,7 +31385,6 @@
3141231385
2034-09-25T00:00:00Z,2034-09-25T01:00:00Z,2034-09-25T05:30:00Z,,
3141331386
2034-09-26T00:00:00Z,2034-09-26T01:00:00Z,2034-09-26T05:30:00Z,,
3141431387
2034-09-27T00:00:00Z,2034-09-27T01:00:00Z,2034-09-27T05:30:00Z,,
31415-
2034-09-28T00:00:00Z,2034-09-28T01:00:00Z,2034-09-28T05:30:00Z,,
3141631388
2034-09-29T00:00:00Z,2034-09-29T01:00:00Z,2034-09-29T05:30:00Z,,
3141731389
2034-10-02T00:00:00Z,2034-10-02T01:00:00Z,2034-10-02T05:30:00Z,,
3141831390
2034-10-03T00:00:00Z,2034-10-03T01:00:00Z,2034-10-03T05:30:00Z,,
@@ -31430,7 +31402,6 @@
3143031402
2034-10-20T00:00:00Z,2034-10-20T01:00:00Z,2034-10-20T05:30:00Z,,
3143131403
2034-10-23T00:00:00Z,2034-10-23T01:00:00Z,2034-10-23T05:30:00Z,,
3143231404
2034-10-24T00:00:00Z,2034-10-24T01:00:00Z,2034-10-24T05:30:00Z,,
31433-
2034-10-25T00:00:00Z,2034-10-25T01:00:00Z,2034-10-25T05:30:00Z,,
3143431405
2034-10-26T00:00:00Z,2034-10-26T01:00:00Z,2034-10-26T05:30:00Z,,
3143531406
2034-10-27T00:00:00Z,2034-10-27T01:00:00Z,2034-10-27T05:30:00Z,,
3143631407
2034-10-30T00:00:00Z,2034-10-30T01:00:00Z,2034-10-30T05:30:00Z,,
@@ -31473,7 +31444,6 @@
3147331444
2034-12-20T00:00:00Z,2034-12-20T01:00:00Z,2034-12-20T05:30:00Z,,
3147431445
2034-12-21T00:00:00Z,2034-12-21T01:00:00Z,2034-12-21T05:30:00Z,,
3147531446
2034-12-22T00:00:00Z,2034-12-22T01:00:00Z,2034-12-22T05:30:00Z,,
31476-
2034-12-25T00:00:00Z,2034-12-25T01:00:00Z,2034-12-25T05:30:00Z,,
3147731447
2034-12-26T00:00:00Z,2034-12-26T01:00:00Z,2034-12-26T05:30:00Z,,
3147831448
2034-12-27T00:00:00Z,2034-12-27T01:00:00Z,2034-12-27T05:30:00Z,,
3147931449
2034-12-28T00:00:00Z,2034-12-28T01:00:00Z,2034-12-28T05:30:00Z,,

tests/test_xtai_calendar.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ def max_session_hours(self):
1717
@pytest.fixture
1818
def regular_holidays_sample(self):
1919
yield [
20+
# New holidays introduced in 2025
21+
"2026-09-28", # Teachers Day
22+
"2026-10-26", # Taiwan Restoration Day
23+
"2026-12-25", # Constitution Day
24+
"2025-09-29", # Teachers Day
25+
"2025-10-24", # Taiwan Restoration Day
26+
"2025-12-25", # Constitution Day
27+
#
2028
# 2019
2129
"2019-01-01", # New Year's Day
2230
"2019-02-04", # Chinese New Year's Eve

0 commit comments

Comments
 (0)