diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 70d0bf433cd44..afbefd9b84461 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -3492,7 +3492,7 @@ default 'raise' year -= 1 month += 12 return (day + - np.fix((153 * month - 457) / 5) + + np.trunc((153 * month - 457) / 5) + 365 * year + np.floor(year / 4) - np.floor(year / 100) + diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 4cf5f4b13890e..9b7ae26bef899 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -2287,7 +2287,7 @@ def to_julian_date(self) -> npt.NDArray[np.float64]: month[testarr] += 12 return ( day - + np.fix((153 * month - 457) / 5) + + np.trunc((153 * month - 457) / 5) + 365 * year + np.floor(year / 4) - np.floor(year / 100)