Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
(4 - date.weekday()) % 7 solution in Clear category for When is Friday? by flpo
import datetime
def friday(day):
d, m, y = map(int, day.split('.'))
date = datetime.date(y, m, d)
return (4 - date.weekday()) % 7
April 27, 2018
Comments: