当前位置:网站首页>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
边栏推荐
- One of the advanced applications of I / O reuse: non blocking connect -- implemented using select (or poll)
- Role of asemi rectifier module mdq100-16 in intelligent switching power supply
- ArrayList collection basic usage
- Contraction mapping theorem
- Programming philosophy - automatic loading, dependency injection and control inversion
- Thread synchronization, life cycle
- 剑指 Offer II 019. 最多删除一个字符得到回文(简单)
- 压缩映射定理
- 科技的成就(二十一)
- Using MATLAB programming to realize the steepest descent method to solve unconstrained optimization problems
猜你喜欢
自动化的艺术
Role of asemi rectifier module mdq100-16 in intelligent switching power supply
GIS数据处理-cesium中模型位置设置
UML project example -- UML diagram description of tiktok
OC to swift conditional compilation, marking, macro, log, version detection, expiration prompt
Branch statement of process control
Swift Protocol 关联对象 资源名称管理 多线程GCD 延迟 once
On the insecurity of using scanf in VS
在游戏世界组建一支AI团队,超参数的多智能体「大乱斗」开赛
【Servlet】Servlet 详解(使用+原理)
随机推荐
Matrix exchange row and column
LeetCode 练习——396. 旋转函数
《JVM系列》 第七章 -- 字节码执行引擎
Interviewer: let's talk about the process of class loading and the mechanism of class loading (parental delegation mechanism)
你还不知道责任链模式的使用场景吗?
go基础 反射
epoll 的 ET,LT工作模式———实例程序
[stc8g2k64s4] introduction of comparator and sample program of comparator power down detection
Set up an AI team in the game world and start the super parametric multi-agent "chaos fight"
Bingbing learning notes: take you step by step to realize the sequence table
Electronic scale weighing system design, hx711 pressure sensor, 51 single chip microcomputer (proteus simulation, C program, schematic diagram, thesis and other complete data)
One of the advanced applications of I / O reuse: non blocking connect -- implemented using select (or poll)
【STC8G2K64S4】比较器介绍以及比较器掉电检测示例程序
压缩映射定理
Advanced application of I / O multiplexing: Processing TCP and UDP services at the same time
Swift protocol Association object resource name management multithreading GCD delay once
Epolloneshot event of epoll -- instance program
capacitance
QT Detailed explanation of pro file
拼接hql时,新增字段没有出现在构造方法中