Lines Matching refs:timedelta
189 hh, mm = divmod(off, timedelta(hours=1))
190 mm, ss = divmod(mm, timedelta(minutes=1))
232 h, rest = divmod(offset, timedelta(hours=1))
233 m, rest = divmod(rest, timedelta(minutes=1))
349 td = timedelta(hours=tz_comps[0], minutes=tz_comps[1],
375 if not isinstance(offset, timedelta):
378 if not -timedelta(1) < offset < timedelta(1):
473 class timedelta: class
641 if isinstance(other, timedelta):
644 return timedelta(self._days + other._days,
652 if isinstance(other, timedelta):
655 return timedelta(self._days - other._days,
661 if isinstance(other, timedelta):
668 return timedelta(-self._days,
685 return timedelta(self._days * other,
691 return timedelta(0, 0, _divide_and_round(usec * a, b))
701 if not isinstance(other, (int, timedelta)):
704 if isinstance(other, timedelta):
707 return timedelta(0, 0, usec // other)
710 if not isinstance(other, (int, float, timedelta)):
713 if isinstance(other, timedelta):
716 return timedelta(0, 0, _divide_and_round(usec, other))
719 return timedelta(0, 0, _divide_and_round(b * usec, a))
722 if isinstance(other, timedelta):
724 return timedelta(0, 0, r)
728 if isinstance(other, timedelta):
731 return q, timedelta(0, 0, r)
737 if isinstance(other, timedelta):
743 if isinstance(other, timedelta):
749 if isinstance(other, timedelta):
755 if isinstance(other, timedelta):
761 if isinstance(other, timedelta):
767 assert isinstance(other, timedelta)
788 timedelta.min = timedelta(-999999999)
789 timedelta.max = timedelta(days=999999999, hours=23, minutes=59, seconds=59,
791 timedelta.resolution = timedelta(microseconds=1)
1067 if isinstance(other, timedelta):
1078 if isinstance(other, timedelta):
1079 return self + timedelta(-other.days)
1083 return timedelta(days1 - days2)
1142 date.resolution = timedelta(days=1)
1396 myhhmm = self._hour * 60 + self._minute - myoff//timedelta(minutes=1)
1397 othhmm = other._hour * 60 + other._minute - otoff//timedelta(minutes=1)
1412 h, m = divmod(timedelta(hours=self.hour, minutes=self.minute) - tzoff,
1413 timedelta(hours=1))
1414 assert not m % timedelta(minutes=1), "whole minute"
1415 m //= timedelta(minutes=1)
1591 time.resolution = timedelta(microseconds=1)
1701 trans = result - probe1 - timedelta(0, max_fold_seconds)
1703 y, m, d, hh, mm, ss = converter(t + trans // timedelta(0, 1))[:6]
1793 t = (self - epoch) // timedelta(0, 1)
1796 return (datetime(y, m, d, hh, mm, ss) - epoch) // timedelta(0, 1)
1883 ts = (self - _EPOCH) // timedelta(seconds=1)
1889 return timezone(timedelta(seconds=gmtoff), zone)
2102 if not isinstance(other, timedelta):
2104 delta = timedelta(self.toordinal(),
2124 if isinstance(other, timedelta):
2132 base = timedelta(days1 - days2,
2157 self._hashcode = hash(timedelta(days, seconds, self.microsecond) - tzoff)
2201 datetime.resolution = timedelta(microseconds=1)
2222 if not isinstance(offset, timedelta):
2309 _maxoffset = timedelta(hours=24, microseconds=-1)
2316 if delta < timedelta(0):
2321 hours, rest = divmod(delta, timedelta(hours=1))
2322 minutes, rest = divmod(rest, timedelta(minutes=1))
2332 timezone.utc = timezone._create(timedelta(0))
2336 timezone.min = timezone._create(-timedelta(hours=23, minutes=59))
2337 timezone.max = timezone._create(timedelta(hours=23, minutes=59))