当前位置:网站首页>January 1, 1990 is Monday. Define the function date_ to_ Week (year, month, day), which realizes the function of returning the day of the week after inputting the year, month and day, such as date_ to
January 1, 1990 is Monday. Define the function date_ to_ Week (year, month, day), which realizes the function of returning the day of the week after inputting the year, month and day, such as date_ to
2022-04-23 14:48:00 【jinjuana521】
def date_to_week(year,month,day):
run_year=[31,28,31,30,31,30,31,31,30,31,30,31]
ping_year=[31,28,31,30,31,30,31,31,30,31,30,31]
year_day=0
for i in range(1990,year):
if i%4000 or (i%40 and i%1000):
year_day+=366
else:
year_day+=365
print(year_day)
if year%400 == 0 or (year%40 and year%100==0):
m_day=sum(run_year[0:month-1])
else:
m_day=sum(ping_year[0:month-1])
print(m_day)
day1=year_day+m_day+day
print(day1)
list5=[‘ Sunday ’,‘ Monday ’,‘ Tuesday ’,‘ Wednesday ’,‘ Thursday ’,‘ Friday ’,‘ Saturday ’]
j=day1%7
print(list5[j])
c=date_to_week(2020,11,1)
print
版权声明
本文为[jinjuana521]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231447552890.html
边栏推荐
- Epolloneshot event of epoll -- instance program
- Is asemi ultrafast recovery diode interchangeable with Schottky diode
- Swift: entry of program, swift calls OC@_ silgen_ Name, OC calls swift, dynamic, string, substring
- Arduino for esp8266串口功能简介
- ArrayList collection basic usage
- 线程同步、生命周期
- Proteus simulation design of DC adjustable regulated power supply (with simulation + paper and other data)
- eolink 如何助力遠程辦公
- Advanced application of I / O multiplexing: Processing TCP and UDP services at the same time
- Contraction mapping theorem
猜你喜欢

LeetCode153-寻找旋转排序数组中的最小值-数组-二分查找

编程哲学——自动加载、依赖注入与控制反转

Sword finger offer II 019 Delete at most one character to get palindrome (simple)

冰冰学习笔记:一步一步带你实现顺序表

Using MATLAB programming to realize the steepest descent method to solve unconstrained optimization problems

MDS55-16-ASEMI整流模块MDS55-16

GIS数据处理-cesium中模型位置设置

ASEMI三相整流桥和单相整流桥的详细对比

I thought I could lie down and enter Huawei, but I was confused when I received JD / didi / iqiyi offers one after another

555 timer + 74 series chip to build eight way responder, 30s countdown, proteus simulation, etc
随机推荐
Is asemi ultrafast recovery diode interchangeable with Schottky diode
中富金石财富班29800效果如何?与专业投资者同行让投资更简单
pnpm安装使用
8.3 语言模型与数据集
We reference My97DatePicker to realize the use of time plug-in
LeetCode162-寻找峰值-二分-数组
MCU function signal generator, output four kinds of waveforms, adjustable frequency, schematic diagram, simulation and C program
Electronic scale weighing system design, hx711 pressure sensor, 51 single chip microcomputer (proteus simulation, C program, schematic diagram, thesis and other complete data)
冰冰学习笔记:一步一步带你实现顺序表
UML项目实例——抖音的UML图描述
QT Detailed explanation of pro file
8.4 循环神经网络从零实现
eolink 如何助力遠程辦公
Progress in the treatment of depression
外包干了四年,废了...
Epoll's et, lt working mode -- example program
Achievements in science and Technology (21)
Interviewer: let's talk about the process of class loading and the mechanism of class loading (parental delegation mechanism)
AT89C52 MCU frequency meter (1Hz ~ 20MHz) design, LCD1602 display, including simulation, schematic diagram, PCB and code, etc
Unity_代码方式添加绑定按钮点击事件