

def _apply_rule(self, dates):
    '\n        Apply the given offset/observance to a DatetimeIndex of dates.\n\n        Parameters\n        ----------\n        dates : DatetimeIndex\n            Dates to apply the given offset/observance rule\n\n        Returns\n        -------\n        Dates with rules applied\n        '
    if (self.observance is not None):
        return dates.map((lambda d: self.observance(d)))
    if (self.offset is not None):
        if (not isinstance(self.offset, list)):
            offsets = [self.offset]
        else:
            offsets = self.offset
        for offset in offsets:
            with warnings.catch_warnings(record=True):
                dates += offset
    return offsets

dataset/ETHPy150Open pydata/pandas/pandas/tseries/holiday.py Holiday._apply_rule/VarMisuse@119/218 `dates`->`offsets`