(hour, minute, second, microsecond, fold)
| 578 | return year, month, day |
| 579 | |
| 580 | def _check_time_fields(hour, minute, second, microsecond, fold): |
| 581 | hour = _index(hour) |
| 582 | minute = _index(minute) |
| 583 | second = _index(second) |
| 584 | microsecond = _index(microsecond) |
| 585 | if not 0 <= hour <= 23: |
| 586 | raise ValueError(f"hour must be in 0..23, not {hour}") |
| 587 | if not 0 <= minute <= 59: |
| 588 | raise ValueError(f"minute must be in 0..59, not {minute}") |
| 589 | if not 0 <= second <= 59: |
| 590 | raise ValueError(f"second must be in 0..59, not {second}") |
| 591 | if not 0 <= microsecond <= 999999: |
| 592 | raise ValueError(f"microsecond must be in 0..999999, not {microsecond}") |
| 593 | if fold not in (0, 1): |
| 594 | raise ValueError(f"fold must be either 0 or 1, not {fold}") |
| 595 | return hour, minute, second, microsecond, fold |
| 596 | |
| 597 | def _check_tzinfo_arg(tz): |
| 598 | if tz is not None and not isinstance(tz, tzinfo): |
no test coverage detected
searching dependent graphs…