MCPcopy Index your code
hub / github.com/RustPython/RustPython / weekday

Function weekday

Lib/calendar.py:156–160  ·  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

154
155
156def weekday(year, month, day):
157 """Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31)."""
158 if not datetime.MINYEAR <= year <= datetime.MAXYEAR:
159 year = 2000 + year % 400
160 return Day(datetime.date(year, month, day).weekday())
161
162
163def _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