(year, month, day)
| 556 | f"timedelta(hours=24), not {offset!r}") |
| 557 | |
| 558 | def _check_date_fields(year, month, day): |
| 559 | year = _index(year) |
| 560 | month = _index(month) |
| 561 | day = _index(day) |
| 562 | if not MINYEAR <= year <= MAXYEAR: |
| 563 | raise ValueError(f"year must be in {MINYEAR}..{MAXYEAR}, not {year}") |
| 564 | if not 1 <= month <= 12: |
| 565 | raise ValueError(f"month must be in 1..12, not {month}") |
| 566 | dim = _days_in_month(year, month) |
| 567 | if not 1 <= day <= dim: |
| 568 | raise ValueError(f"day {day} must be in range 1..{dim} for month {month} in year {year}") |
| 569 | return year, month, day |
| 570 | |
| 571 | def _check_time_fields(hour, minute, second, microsecond, fold): |
| 572 | hour = _index(hour) |
no test coverage detected