Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Weekly Calendar by yoichi
from datetime import date, timedelta
from typing import List
def weekly_calendar(year: int, month: int, day: int, firstweekday: int) -> List[int]:
target = date(year, month, day)
diff = (target.weekday()-firstweekday) % 7
return [(target+timedelta(days=d-diff)).day for d in range(7)]
Sept. 27, 2020
Comments: