def dates(self, start_date, end_date, return_name=False):
start_date = Timestamp(start_date)<EOL>end_date = Timestamp(end_date)<EOL>filter_start_date = start_date<EOL>filter_end_date = end_date<EOL>if self.year is not None:<EOL><INDENT>dt = Timestamp(datetime(self.year, self.month, self.day))<EOL>if return_name:<EOL><INDENT>return Series(self.name, index=[dt])<EOL><DEDENT>else:<EOL><INDENT>return [dt]<EOL><DEDENT><DEDENT>dates = self._reference_dates(start_date, end_date)<EOL>holiday_dates = self._apply_rule(dates)<EOL>if self.days_of_week is not None:<EOL><INDENT>holiday_dates = holiday_dates[np.in1d(holiday_dates.dayofweek,<EOL>self.days_of_week)]<EOL><DEDENT>if self.start_date is not None:<EOL><INDENT>filter_start_date = max(self.start_date.tz_localize(<EOL>filter_start_date.tz), filter_start_date)<EOL><DEDENT>if self.end_date is not None:<EOL><INDENT>filter_end_date = min(self.end_date.tz_localize(<EOL>filter_end_date.tz), filter_end_date)<EOL><DEDENT>holiday_dates = holiday_dates[(holiday_dates >= filter_start_date) &<EOL>(holiday_dates <= filter_end_date)]<EOL>if return_name:<EOL><INDENT>return Series(self.name, index=holiday_dates)<EOL><DEDENT>return holiday_dates<EOL>
Calculate holidays observed between start date and end date

Parameters
----------
start_date : starting date, datetime-like, optional
end_date : ending date, datetime-like, optional
return_name : bool, optional, default=False
    If True, return a series that has dates and holiday names.
    False will only return dates.