Ejemplo n.º 1
0
 def __rsub__(self, time):
     if isinstance(time, Duration):
         output = Duration(0)
         output.milli = time.milli - self.milli
         output.month = time.month - self.month
         return output
     else:
         return time - relativedelta(months=self.month, seconds=self.milli/1000)
Ejemplo n.º 2
0
 def __rsub__(self, time):
     if isinstance(time, Duration):
         output = Duration(0)
         output.milli = time.milli - self.milli
         output.month = time.month - self.month
         return output
     else:
         return time - relativedelta(months=self.month, seconds=self.milli/1000)