MCPcopy Index your code
hub / github.com/python/cpython / weekday

Function weekday

Lib/calendar.py:175–179  ·  view source on GitHub ↗

Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).

(year, month, day)

Source from the content-addressed store, hash-verified

173
174
175def weekday(year, month, day):
176 """Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31)."""
177 if not datetime.MINYEAR <= year <= datetime.MAXYEAR:
178 year = 2000 + year % 400
179 return Day(datetime.date(year, month, day).weekday())
180
181
182def _validate_month(month):

Callers 1

monthrangeFunction · 0.85

Calls 3

DayClass · 0.85
dateMethod · 0.80
weekdayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…