Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The First Working Day by ssk8
from datetime import datetime, timedelta
def vacation(date, days):
rd = datetime.strptime(date, '%Y-%m-%d') + timedelta(days=days)
if rd.weekday() > 4:
rd += timedelta(days=(7-rd.weekday()))
return str(rd.date())
Oct. 19, 2018
Comments: