You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Overwrite the default holiday calendar start_date of 1/1/70 AbstractHolidayCalendar.start_date='1885-01-01'
There are several other ways this can be handled without changing the behavior of classes in a third party library.
Here is an example of a test which should pass, but which currently fails with v4.3.1
deftest_custom_business_day():
importpandasaspdfrompandas.tseries.holidayimportMO, AbstractHolidayCalendar, Holidayfrompandas.tseries.offsetsimportCustomBusinessDayUSMemorialDay=Holiday(
"Memorial Day", month=5, day=31, offset=pd.DateOffset(weekday=MO(-1))
)
classExampleCalendar(AbstractHolidayCalendar):
rules= [USMemorialDay]
bday1=CustomBusinessDay(calendar=ExampleCalendar())
bday2=CustomBusinessDay(calendar=ExampleCalendar())
# this assertion passesassertbday1==bday2# but then we import pandas_market_calendars and try the same thing ...importpandas_market_calendarsbday3=CustomBusinessDay(calendar=ExampleCalendar())
# and now this assertion failsassertbday1==bday3
The text was updated successfully, but these errors were encountered:
This package modifies the behavior of core pandas features here in
pandas_market_calendars/calendars/nyse.py
There are several other ways this can be handled without changing the behavior of classes in a third party library.
Here is an example of a test which should pass, but which currently fails with
v4.3.1
The text was updated successfully, but these errors were encountered: