@@ -18,12 +18,12 @@ cnp.import_array()
1818from util cimport is_string_object, is_integer_object
1919
2020from ccalendar import MONTHS, DAYS
21+ from ccalendar cimport get_days_in_month, dayofweek
2122from conversion cimport tz_convert_single, pydt_to_i8
2223from frequencies cimport get_freq_code
2324from nattype cimport NPY_NAT
2425from np_datetime cimport (pandas_datetimestruct,
25- dtstruct_to_dt64, dt64_to_dtstruct,
26- is_leapyear, days_per_month_table, dayofweek)
26+ dtstruct_to_dt64, dt64_to_dtstruct)
2727
2828# ---------------------------------------------------------------------
2929# Constants
@@ -494,12 +494,6 @@ class BaseOffset(_BaseOffset):
494494# ----------------------------------------------------------------------
495495# RelativeDelta Arithmetic
496496
497- @ cython.wraparound (False )
498- @ cython.boundscheck (False )
499- cdef inline int get_days_in_month(int year, int month) nogil:
500- return days_per_month_table[is_leapyear(year)][month - 1 ]
501-
502-
503497cdef inline int year_add_months(pandas_datetimestruct dts, int months) nogil:
504498 """ new year number after shifting pandas_datetimestruct number of months"""
505499 return dts.year + (dts.month + months - 1 ) / 12
0 commit comments