@classmethod<EOL><INDENT>def _add_datetimelike_methods(cls):<DEDENT>
def __add__(self, other):<EOL><INDENT>result = self._data.__add__(maybe_unwrap_index(other))<EOL>return wrap_arithmetic_op(self, other, result)<EOL><DEDENT>cls.__add__ = __add__<EOL>def __radd__(self, other):<EOL><INDENT>return self.__add__(other)<EOL><DEDENT>cls.__radd__ = __radd__<EOL>def __sub__(self, other):<EOL><INDENT>result = self._data.__sub__(maybe_unwrap_index(other))<EOL>return wrap_arithmetic_op(self, other, result)<EOL><DEDENT>cls.__sub__ = __sub__<EOL>def __rsub__(self, other):<EOL><INDENT>result = self._data.__rsub__(maybe_unwrap_index(other))<EOL>return wrap_arithmetic_op(self, other, result)<EOL><DEDENT>cls.__rsub__ = __rsub__<EOL>
Add in the datetimelike methods (as we may have to override the
superclass).