numpy.busday_count()

numpy.busday_count

numpy.busday_count(begindates, enddates, weekmask='1111100', holidays=[], busdaycal=None, out=None)

Counts the number of valid days between begindates and enddates, not including the day of enddates.

If enddates specifies a date value that is earlier than the corresponding begindates date value, the count will be negative.

New in version 1.7.0.

Parameters:

begindates : array_like of datetime64[D]

The array of the first dates for counting.

enddates : a