def apply(self, other): n = self.n if other.day > 1 and n <= 0: # then roll forward if n<=0 n += 1 return other + relativedelta(months=n, day=1)