Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
divmod solution in Clear category for Weekend Counter by Phil15
def checkio(from_date, to_date):
nb_weeks, few_days = divmod((to_date - from_date).days, 7)
return 2*nb_weeks+sum((from_date.weekday()+i)%7>=5 for i in range(few_days+1))
Oct. 1, 2019