def get_month_days(year, month):
which_day, day_num = calendar.monthrange(year, month)
day_list = []
diff = which_day - 1 # 1%7
for i in range(1, day_num + 1):
week_day = (i % 7 + diff) % 7
day_list.append((i, week_day))
return day_list
网友评论