Skip to content

Commit

Permalink
Ensure ad-hoc holidays are proper Pandas timestamps.
Browse files Browse the repository at this point in the history
  • Loading branch information
jenskeiner authored and maread99 committed Jun 24, 2024
1 parent 7fb0169 commit 72851b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions exchange_calendars/exchange_calendar_xbue.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,16 @@ def adhoc_holidays(self):
"2016-11-28", # Day of National Sovereignty
]

return list(
chain(
return [
pd.Timestamp(d)
for d in chain(
misc_adhocs,
market_closures_2002_jan,
market_closures_2002_apr,
bridge_days,
irregular_observances,
)
)
]

@property
def special_closes(self):
Expand Down
7 changes: 4 additions & 3 deletions exchange_calendars/exchange_calendar_xphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,13 @@ def adhoc_holidays(self):
"2010-12-31",
]

return list(
chain(
return [
pd.Timestamp(d)
for d in chain(
misc_adhoc,
pre_2011_holidays,
ChineseNewYearAfter2011,
philippines_eid_al_adha,
philippines_eid_al_fitr,
)
)
]

0 comments on commit 72851b3

Please sign in to comment.