(year, month, day)
| 565 | f"timedelta(hours=24), not {offset!r}") |
| 566 | |
| 567 | def _check_date_fields(year, month, day): |
| 568 | year = _index(year) |
| 569 | month = _index(month) |
| 570 | day = _index(day) |
| 571 | if not MINYEAR <= year <= MAXYEAR: |
| 572 | raise ValueError(f"year must be in {MINYEAR}..{MAXYEAR}, not {year}") |
| 573 | if not 1 <= month <= 12: |
| 574 | raise ValueError(f"month must be in 1..12, not {month}") |
| 575 | dim = _days_in_month(year, month) |
| 576 | if not 1 <= day <= dim: |
| 577 | raise ValueError(f"day {day} must be in range 1..{dim} for month {month} in year {year}") |
| 578 | return year, month, day |
| 579 | |
| 580 | def _check_time_fields(hour, minute, second, microsecond, fold): |
| 581 | hour = _index(hour) |
no test coverage detected
searching dependent graphs…