• Home
  • Raw
  • Download

Lines Matching refs:timedelta

190         hh, mm = divmod(off, timedelta(hours=1))
191 mm, ss = divmod(mm, timedelta(minutes=1))
233 h, rest = divmod(offset, timedelta(hours=1))
234 m, rest = divmod(rest, timedelta(minutes=1))
350 td = timedelta(hours=tz_comps[0], minutes=tz_comps[1],
376 if not isinstance(offset, timedelta):
379 if not -timedelta(1) < offset < timedelta(1):
442 class timedelta: class
610 if isinstance(other, timedelta):
613 return timedelta(self._days + other._days,
621 if isinstance(other, timedelta):
624 return timedelta(self._days - other._days,
630 if isinstance(other, timedelta):
637 return timedelta(-self._days,
654 return timedelta(self._days * other,
660 return timedelta(0, 0, _divide_and_round(usec * a, b))
670 if not isinstance(other, (int, timedelta)):
673 if isinstance(other, timedelta):
676 return timedelta(0, 0, usec // other)
679 if not isinstance(other, (int, float, timedelta)):
682 if isinstance(other, timedelta):
685 return timedelta(0, 0, _divide_and_round(usec, other))
688 return timedelta(0, 0, _divide_and_round(b * usec, a))
691 if isinstance(other, timedelta):
693 return timedelta(0, 0, r)
697 if isinstance(other, timedelta):
700 return q, timedelta(0, 0, r)
706 if isinstance(other, timedelta):
712 if isinstance(other, timedelta):
718 if isinstance(other, timedelta):
724 if isinstance(other, timedelta):
730 if isinstance(other, timedelta):
736 assert isinstance(other, timedelta)
757 timedelta.min = timedelta(-999999999)
758 timedelta.max = timedelta(days=999999999, hours=23, minutes=59, seconds=59,
760 timedelta.resolution = timedelta(microseconds=1)
1036 if isinstance(other, timedelta):
1047 if isinstance(other, timedelta):
1048 return self + timedelta(-other.days)
1052 return timedelta(days1 - days2)
1111 date.resolution = timedelta(days=1)
1365 myhhmm = self._hour * 60 + self._minute - myoff//timedelta(minutes=1)
1366 othhmm = other._hour * 60 + other._minute - otoff//timedelta(minutes=1)
1381 h, m = divmod(timedelta(hours=self.hour, minutes=self.minute) - tzoff,
1382 timedelta(hours=1))
1383 assert not m % timedelta(minutes=1), "whole minute"
1384 m //= timedelta(minutes=1)
1560 time.resolution = timedelta(microseconds=1)
1670 trans = result - probe1 - timedelta(0, max_fold_seconds)
1672 y, m, d, hh, mm, ss = converter(t + trans // timedelta(0, 1))[:6]
1762 t = (self - epoch) // timedelta(0, 1)
1765 return (datetime(y, m, d, hh, mm, ss) - epoch) // timedelta(0, 1)
1852 ts = (self - _EPOCH) // timedelta(seconds=1)
1858 return timezone(timedelta(seconds=gmtoff), zone)
2071 if not isinstance(other, timedelta):
2073 delta = timedelta(self.toordinal(),
2093 if isinstance(other, timedelta):
2101 base = timedelta(days1 - days2,
2126 self._hashcode = hash(timedelta(days, seconds, self.microsecond) - tzoff)
2170 datetime.resolution = timedelta(microseconds=1)
2191 if not isinstance(offset, timedelta):
2278 _maxoffset = timedelta(hours=24, microseconds=-1)
2285 if delta < timedelta(0):
2290 hours, rest = divmod(delta, timedelta(hours=1))
2291 minutes, rest = divmod(rest, timedelta(minutes=1))
2301 timezone.utc = timezone._create(timedelta(0))
2305 timezone.min = timezone._create(-timedelta(hours=23, minutes=59))
2306 timezone.max = timezone._create(timedelta(hours=23, minutes=59))