Lines Matching refs:hour
528 def _check_time_fields(hour, minute, second, microsecond, fold):
529 hour = _index(hour)
533 if not 0 <= hour <= 23:
534 raise ValueError('hour must be in 0..23', hour)
543 return hour, minute, second, microsecond, fold
1336 hour, minute, second, microsecond, tzinfo, fold
1340 def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0):
1345 hour, minute (required)
1350 if (isinstance(hour, (bytes, str)) and len(hour) == 6 and
1351 ord(hour[0:1])&0x7F < 24):
1353 if isinstance(hour, str):
1355 hour = hour.encode('latin1')
1363 self.__setstate(hour, minute or None)
1366 hour, minute, second, microsecond, fold = _check_time_fields(
1367 hour, minute, second, microsecond, fold)
1370 self._hour = hour
1381 def hour(self):
1382 """hour (0-23)"""
1482 h, m = divmod(timedelta(hours=self.hour, minutes=self.minute) - tzoff,
1611 def replace(self, hour=None, minute=None, second=None, microsecond=None,
1614 if hour is None:
1615 hour = self.hour
1626 return type(self)(hour, minute, second, microsecond, tzinfo, fold=fold)
1670 """datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])
1677 def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0,
1696 hour, minute, second, microsecond, fold = _check_time_fields(
1697 hour, minute, second, microsecond, fold)
1703 self._hour = hour
1714 def hour(self):
1715 """hour (0-23)"""
1823 time.hour, time.minute, time.second, time.microsecond,
1867 self.hour, self.minute, self.second,
1919 hh, mm, ss = self.hour, self.minute, self.second
1928 return time(self.hour, self.minute, self.second, self.microsecond, fold=self.fold)
1932 return time(self.hour, self.minute, self.second, self.microsecond,
1935 def replace(self, year=None, month=None, day=None, hour=None,
1945 if hour is None:
1946 hour = self.hour
1957 return type(self)(year, month, day, hour, minute, second,
2191 hour, rem = divmod(delta.seconds, 3600)
2195 time(hour, minute, second,
2237 seconds = self.hour * 3600 + self.minute * 60 + self.second
2567 # the end of DST, where there's an hour in UTC with no spelling in a hybrid
2569 # that hour, on an Eastern clock 1:MM is taken as being in standard time (6:MM
2572 # clock jumps from 1:59 back to 1:00 again, and repeats the 1:MM hour in
2593 # clock repeats an hour" behavior when mapping the "unspellable" UTC hour into