Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
4-liner: conditionals solution in Speedy category for When is Friday? by Stensen
from datetime import datetime
def friday(dt):
w = datetime.strptime(dt, '%d.%m.%Y').weekday()
return 4 - w if w <= 4 else 11 - w
Oct. 7, 2020
Comments: