First solution in Clear category for When is Friday? by new_hoschi
from datetime import datetime
# construct a datetime object, get its weekday (as a number between 0 and 6)
# calculate the difference to friday(==4) and in case this is negative (i.e.
# Saturday or Sunday) calculate the modulus -1 -> 6 , -2 -> 5
## or even shorter but barely readable in one line:
# return (4-datetime.strptime(day,"%d.%m.%Y").weekday())%7
June 10, 2020