Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,10 @@ cdef class BusinessMixin(SingleConstructorOffset):
calendar, holidays = _get_calendar(
weekmask=weekmask, holidays=holidays, calendar=calendar
)
if not isinstance(calendar, np.busdaycalendar):
raise TypeError(
"Custom subclasses only accept np.busdaycalendar."
)
# Custom offset instances are identified by the
# following two attributes. See DateOffset._params()
# holidays, weekmask
Expand Down
Loading