(
date: pd.Timestamp | datetime | CFTimeDatetime, calendar: str
)
| 442 | |
| 443 | |
| 444 | def _check_date_is_after_shift( |
| 445 | date: pd.Timestamp | datetime | CFTimeDatetime, calendar: str |
| 446 | ) -> None: |
| 447 | # if we have gregorian/standard we need to raise |
| 448 | # if we are outside the well-defined date range |
| 449 | # proleptic_gregorian and standard/gregorian are only equivalent |
| 450 | # if reference date and date range is >= 1582-10-15 |
| 451 | if calendar != "proleptic_gregorian" and date < type(date)(1582, 10, 15): |
| 452 | raise OutOfBoundsDatetime( |
| 453 | f"Dates before 1582-10-15 cannot be decoded " |
| 454 | f"with pandas using {calendar!r} calendar: {date}" |
| 455 | ) |
| 456 | |
| 457 | |
| 458 | def _check_higher_resolution( |
no test coverage detected
searching dependent graphs…