class_docstr: Class that defines a holiday with start/end dates and rules
  for observance.
class_docstr_tok: ["Class","that","defines","a","holiday","with","start\/end","dates","and","rules","for","observance","."]
docstr: 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.
docstr_tok: ["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","."]
code: def dates(self, start_date, end_date, return_name=False):
      """
      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.
      """
      start_date = Timestamp(start_date)
      end_date = Timestamp(end_date)
  
      filter_start_date = start_date
      filter_end_date = end_date
  
      if self.year is not None:
          dt = Timestamp(datetime(self.year, self.month, self.day))
          if return_name:
              return Series(self.name, index=[dt])
          else:
              return [dt]
  
      dates = self._reference_dates(start_date, end_date)
      holiday_dates = self._apply_rule(dates)
      if self.days_of_week is not None:
          holiday_dates = holiday_dates[
              np.in1d(holiday_dates.dayofweek, self.days_of_week)
          ]
  
      if self.start_date is not None:
          filter_start_date = max(
              self.start_date.tz_localize(filter_start_date.tz),
              filter_start_date,
          )
      if self.end_date is not None:
          filter_end_date = min(
              self.end_date.tz_localize(filter_end_date.tz),
              filter_end_date,
          )
      holiday_dates = holiday_dates[
          (holiday_dates >= filter_start_date)
          & (holiday_dates <= filter_end_date)
      ]
      if return_name:
          return Series(self.name, index=holiday_dates)
      return holiday_dates
  
imports: from datetime import datetime, timedelta
  import warnings
  from dateutil.relativedelta import FR, MO, SA, SU, TH, TU, WE
  import numpy
  from pandas.compat import add_metaclass
  from pandas.errors import PerformanceWarning
  from pandas import DateOffset, Series, Timestamp, date_range
  from pandas.tseries.offsets import Day, Easter
label_desc: Use image node_id 3 for calling the Holiday obj's underlying member method code with example usage: obj.dates(start_date, end_date, return_name) and returns: holiday_dates, Series, Series, list