Number of days between 2 dates, excluding weekends

I think the cleanest solution is to use the numpy function busday_count

import numpy as np
import datetime as dt

start = dt.date( 2014, 1, 1 )
end = dt.date( 2014, 1, 16 )

days = np.busday_count( start, end )

Leave a Comment