Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
walrus solution in Clear category for When is Friday? by P_Monchan
from datetime import datetime as dt
friday = lambda s: 5 - b if (b := dt.strptime(s, "%d.%m.%Y").isoweekday()) <= 5 else 7 - b + 5
Aug. 2, 2022
Comments: