Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Weekend Counter by vnkvstnk
from datetime import date, timedelta
def checkio(from_date, to_date):
"""
Count the days of rest
"""
count, today = 0, from_date
while today <= to_date:
count += today.weekday() > 4
today += timedelta(1)
return count
April 10, 2020