Skip to content
Closed
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
15 changes: 1 addition & 14 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,7 @@ cdef _get_calendar(weekmask, holidays, calendar):
pass
return calendar, holidays

if holidays is None:
holidays = []
try:
holidays = holidays + calendar.holidays().tolist()
except AttributeError:
pass
holidays = tuple(sorted(_to_dt64D(dt) for dt in holidays))

kwargs = {"weekmask": weekmask}
if holidays:
kwargs["holidays"] = holidays

busdaycalendar = np.busdaycalendar(**kwargs)
return busdaycalendar, holidays
raise ApplyTypeError(f"Unhandled type: {type(calendar).__name__}")


cdef _to_dt64D(dt):
Expand Down
Loading