def timedelta_to_seconds(x): """Convert a timedelta into an amount of seconds""" if isinstance(x, timedelta): return total_seconds(x) return x
def _tonumber(self, d): """ Converts a date to a number """ if d is None: return None return total_seconds(d - self._offset)
def timedelta_to_seconds(x): if isinstance(x, timedelta): return total_seconds(x) return x