参考链接: Python中的日历函数 2(monthrange(),prcal(),weekday()…)
Python calendar.weekday()方法 (Python calendar.weekday() Method)
weekday() method is an inbuilt method of the calendar module in Python. It works on simple text calendars and returns what is the day of the week for the given year, month and day mentioned in the function argument. Here Monday denotes 0 and incrementing the following days by one for the year(1970–…), month (1–12), day (1–31).
weekday()方法是Python中日历模块的内置方法。 它适用于简单的文本日历,并返回函数参数中给定的年,月和日的星期几。 在这里,星期一表示0,然后将年(1970–…),月(1–12),天(1–31)的第二天增加1。
Module:
模块:
import calendar
Syntax:
句法:
weekday(year, month, day)
Parameter(s):
参数:
year: It is a required parameter, which represents the year value of the calendar year :这是必填参数,代表日历的年份 month: It is a