

def __sub__(self, other):
    if (type(other) == Chronyk):
        delta = (self.__timestamp__ - other.timestamp(timezone=0))
        return ChronykDelta(delta)
    if (type(other) == ChronykDelta):
        newtimest = (self.timestamp() - other.seconds)
        return Chronyk(newtimest, timezone=self.timezone)
    if (type(other) in [int, float]):
        newtimest = (self.timestamp() - other)
        return Chronyk(newtimest, timezone=self.timezone)
    return NotImplemented

dataset/ETHPy150Open KoffeinFlummi/Chronyk/chronyk/chronyk.py Chronyk.__sub__/original