def slice first, last
      if first.is_a?(Integer) && last.is_a?(Integer)
        DateTimeIndex.new(to_a[first..last], freq: @offset)
      else
        first = Helper.find_date_string_bounds(first)[0] if first.is_a?(String)
        last  = Helper.find_date_string_bounds(last)[1] if last.is_a?(String)

        slice_between_dates first, last
      end
    end
Retrive a slice of the index by specifying first and last members of the slice.

@param [String, DateTime] first Start of the slice as a string or DateTime.
@param [String, DateTime] last End of the slice as a string or DateTime.