Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
thanks to timedelta solution in Clear category for Weekend Counter by Stensen
from datetime import date, timedelta
def checkio(d1, d2):
r=0
while d1<=d2:
r +=1 if d1.weekday() in (5, 6) else 0
d1+=timedelta(days=1)
return r
Sept. 25, 2020
Comments: