def holidays(self, start=None, end=None, return_name=False):
if self.rules is None:<EOL><INDENT>raise Exception('<STR_LIT>'<EOL>'<STR_LIT>'.format(name=self.name))<EOL><DEDENT>if start is None:<EOL><INDENT>start = AbstractHolidayCalendar.start_date<EOL><DEDENT>if end is None:<EOL><INDENT>end = AbstractHolidayCalendar.end_date<EOL><DEDENT>start = Timestamp(start)<EOL>end = Timestamp(end)<EOL>holidays = None<EOL>if (self._cache is None or start < self._cache[<NUM_LIT:0>] or<EOL>end > self._cache[<NUM_LIT:1>]):<EOL><INDENT>for rule in self.rules:<EOL><INDENT>rule_holidays = rule.dates(start, end, return_name=True)<EOL>if holidays is None:<EOL><INDENT>holidays = rule_holidays<EOL><DEDENT>else:<EOL><INDENT>holidays = holidays.append(rule_holidays)<EOL><DEDENT><DEDENT>self._cache = (start, end, holidays.sort_index())<EOL><DEDENT>holidays = self._cache[<NUM_LIT:2>]<EOL>holidays = holidays[start:end]<EOL>if return_name:<EOL><INDENT>return holidays<EOL><DEDENT>else:<EOL><INDENT>return holidays.index<EOL><DEDENT>
Returns a curve with holidays between start_date and end_date

Parameters
----------
start : starting date, datetime-like, optional
end : ending date, datetime-like, optional
return_name : bool, optional
    If True, return a series that has dates and holiday names.
    False will only return a DatetimeIndex of dates.

Returns
-------
    DatetimeIndex of holidays