@@ -18,12 +18,12 @@ cnp.import_array()
18
18
from util cimport is_string_object, is_integer_object
19
19
20
20
from ccalendar import MONTHS, DAYS
21
+ from ccalendar cimport get_days_in_month, dayofweek
21
22
from conversion cimport tz_convert_single, pydt_to_i8
22
23
from frequencies cimport get_freq_code
23
24
from nattype cimport NPY_NAT
24
25
from 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)
27
27
28
28
# ---------------------------------------------------------------------
29
29
# Constants
@@ -494,12 +494,6 @@ class BaseOffset(_BaseOffset):
494
494
# ----------------------------------------------------------------------
495
495
# RelativeDelta Arithmetic
496
496
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
-
503
497
cdef inline int year_add_months(pandas_datetimestruct dts, int months) nogil:
504
498
""" new year number after shifting pandas_datetimestruct number of months"""
505
499
return dts.year + (dts.month + months - 1 ) / 12
0 commit comments