weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday"]
def ymd(year,month,day):
m_day=[0,31,28,31,30,31,30,31,31,30,31,30,31]
days=0
year=abs(year)
for i in range(0,year):
if i%400==0 or (i%4==0 and i%100!=0 ):
days+=366
else:
days+=365
if (year%400==0 or (year%4==0 and year%100!=0 )):
m_day[2]=29
......................
阅读全部 | 2022年4月16日 19:37
weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday"]
def ymd(year,month,day):
m_day=[0,31,28,31,30,31,30,31,31,30,31,30,31]
days=0
for i in range(year):
if i%400==0 or (i%4==0 and i%100!=0 ):
days+=366
else:
days+=365
for k in range(1,month):
days+=m_day[k]
if k==2 and (year%400==0 or (year%4==0 and year%100!=0 )):
......................
阅读全部 | 2022年4月16日 17:44
weekday=["Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday"]
days=0
m_day=[31,28,31,30,31,30,31,31,30,31,30,31]
for i in range(2020):
if i%400 or (i%4==0 and i%100!=0):
days+=366
else:
days+=365
for k in range(11):
days+=m_day[k]
t_days=days+18+1 #2020-11-18
print(t_days%7)
......................
阅读全部 | 2022年4月13日 20:43