We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a23af4e commit da667afCopy full SHA for da667af
pandas/_libs/tslibs/offsets.pyx
@@ -3705,7 +3705,7 @@ cdef inline void _shift_months(const int64_t[:] dtindex,
3705
"""See shift_months.__doc__"""
3706
cdef:
3707
Py_ssize_t i
3708
- int months_to_roll, compare_day
+ int months_to_roll
3709
npy_datetimestruct dts
3710
3711
for i in range(count):
@@ -3715,10 +3715,8 @@ cdef inline void _shift_months(const int64_t[:] dtindex,
3715
3716
dt64_to_dtstruct(dtindex[i], &dts)
3717
months_to_roll = months
3718
- compare_day = get_day_of_month(&dts, day_opt)
3719
3720
- months_to_roll = roll_convention(dts.day, months_to_roll,
3721
- compare_day)
+ months_to_roll = _roll_qtrday(&dts, months_to_roll, 0, day_opt)
3722
3723
dts.year = year_add_months(dts, months_to_roll)
3724
dts.month = month_add_months(dts, months_to_roll)
0 commit comments