MCPcopy
hub / github.com/pydata/xarray / _check_date_is_after_shift

Function _check_date_is_after_shift

xarray/coding/times.py:444–455  ·  view source on GitHub ↗
(
    date: pd.Timestamp | datetime | CFTimeDatetime, calendar: str
)

Source from the content-addressed store, hash-verified

442
443
444def _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
458def _check_higher_resolution(

Calls 1

typeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…