Add business days to a given date, taking holidays into consideration.

        Note:
            By definition, a zero offset causes the function to return the
            initial date, even it is not a business date. An offset of 1
            represents the next business date, regardless of date being a
            business date or not.

        Args:
            date (date, datetime or str): Date to be incremented.
            offset (integer): Number of business days to add. Positive values
                move the date forward and negative values move the date back.

        Returns:
            datetime: New incremented date.

def addbusdays(self, date, offset):
        """
        Add business days to a given date, taking holidays into consideration.

        Note:
            By definition, a zero offset causes the function to return the
            initial date, even it is not a business date. An offset of 1
            represents the next business date, regardless of date being a
            business date or not.

        Args:
            date (date, datetime or str): Date to be incremented.
            offset (integer): Number of business days to add. Positive values
                move the date forward and negative values move the date back.

        Returns:
            datetime: New incremented date.
        """
        date = parsefun(date)
        if offset == 0:
            return date

        dateoffset = self.addworkdays(date, offset)
        holidays = self.holidays # speed up
        if not holidays:
            return dateoffset

        weekdaymap = self.weekdaymap # speed up
        datewk = dateoffset.weekday()
        if offset > 0:
            # i is the index of first holiday > date
            # we don't care if the start date is a holiday
            i = bisect.bisect_right(holidays, date)
            if i == len(holidays):
                warn('Holiday list exhausted at end, ' \
                     'addbusday(%s,%s) output may be incorrect.' % \
                     (date, offset))
            else:
                while holidays[i] <= dateoffset:
                    dateoffset += datetime.timedelta(days=\
                                                weekdaymap[datewk].offsetnext)
                    datewk = weekdaymap[datewk].nextworkday
                    i += 1
                    if i == len(holidays):
                        warn('Holiday list exhausted at end, ' \
                             'addbusday(%s,%s) output may be incorrect.' % \
                             (date, offset))
                        break
        else:
            # i is the index of first holiday >= date
            # we don't care if the start date is a holiday
            i = bisect.bisect_left(holidays, date) - 1
            if i == -1:
                warn('Holiday list exhausted at start, ' \
                     'addbusday(%s,%s) output may be incorrect.' \
                     % (date, offset))
            else:
                while holidays[i] >= dateoffset:
                    dateoffset += datetime.timedelta(days=\
                                                weekdaymap[datewk].offsetprev)
                    datewk = weekdaymap[datewk].prevworkday
                    i -= 1
                    if i == -1:
                        warn('Holiday list exhausted at start, ' \
                             'addbusday(%s,%s) output may be incorrect.' % \
                             (date, offset))
                        break

        return dateoffset