当前位置:网站首页>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
边栏推荐
- LeetCode153-寻找旋转排序数组中的最小值-数组-二分查找
- [jz46 translate numbers into strings]
- Provided by Chengdu control panel design_ It's detailed_ Introduction to the definition, compilation and quotation of single chip microcomputer program header file
- Vscode Chinese plug-in doesn't work. Problem solving
- Contraction mapping theorem
- 抑郁症治疗的进展
- MySQL error packet out of order
- TLC5615 based multi-channel adjustable CNC DC regulated power supply, 51 single chip microcomputer, including proteus simulation and C code
- SQL中HAVING和WHERE的区别
- 1N5408-ASEMI整流二极管1N5408
猜你喜欢
A good tool: aardio
eolink 如何助力远程办公
Provided by Chengdu control panel design_ It's detailed_ Introduction to the definition, compilation and quotation of single chip microcomputer program header file
MySQL error packet out of order
阿里研发三面,面试官一套组合拳让我当场懵逼
Mq-2 and DS18B20 fire temperature smoke alarm system design, 51 single chip microcomputer, with simulation, C code, schematic diagram, PCB, etc
【NLP】HMM隐马尔可夫+维特比分词
《JVM系列》 第七章 -- 字节码执行引擎
51 Single Chip Microcomputer Design of traffic light system (with Proteus simulation, C program, schematic diagram, PCB, thesis and other complete data)
8.5 循环神经网络简洁实现
随机推荐
2-Go变量操作
Introduction to Arduino for esp8266 serial port function
Interviewer: let's talk about the process of class loading and the mechanism of class loading (parental delegation mechanism)
AT89C51 MCU digital voltmeter development, measuring range 0 ~ 5V, proteus simulation, schematic diagram, PCB and C program, etc
Sword finger offer II 019 Delete at most one character to get palindrome (simple)
【Servlet】Servlet 详解(使用+原理)
A good tool: aardio
8.2 文本预处理
利用 MATLAB 编程实现最速下降法求解无约束最优化问题
你還不知道責任鏈模式的使用場景嗎?
OC 转 Swift 条件编译、标记、宏、 Log、 版本检测、过期提示
do(Local scope)、初始化器、内存冲突、Swift指针、inout、unsafepointer、unsafeBitCast、successor、
51 MCU flowers, farmland automatic irrigation system development, proteus simulation, schematic diagram and C code
2-GO variable operation
【NLP】HMM隐马尔可夫+维特比分词
Using MATLAB programming to realize the steepest descent method to solve unconstrained optimization problems
pnpm安装使用
Model location setting in GIS data processing -cesium
【STC8G2K64S4】比较器介绍以及比较器掉电检测示例程序
Do (local scope), initializer, memory conflict, swift pointer, inout, unsafepointer, unsafebitcast, success