当前位置:网站首页>Common techniques for handling dates
Common techniques for handling dates
2022-06-11 10:23:00 【[email protected]】
int a[2][13]={
{0,31,28,31,30,31,30,31,31,30,31,30,31},
{0,31,29,31,30,31,30,31,31,30,31,30,31}
}; // Array records 12 Days of months a[0][m] Corresponding to ordinary years ,a[1][m] Corresponding leap year
int leapyear(int y)// Judge that leap years can be 400 to be divisible by || Can be 4 Divisible but not divided by 100 to be divisible by
{
return y%4==0&&y%100!=0||y%400==0;
}
int days(int y,int m)// return y year m Days of the month
{
return a[leapyear(y)][m];
}版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203012231369205.html
边栏推荐
- 【K-Means】K-Means学习实例
- 电子设备辐射EMC整改案例
- How much do you know about software compatibility testing? How to select a software compatibility testing organization?
- 【DBSCAN】DBSCAN实例
- TikTok在英国遭遇文化冲突,短期内众多员工离职
- What are the functions and features of EMG linear light emitter?
- Habitable planet
- 详解2.5G/5G/10G Base-T以太网接口物理层一致性测试!
- 【Objective-C】‘NSAutoreleasePool‘ is unavailable: not available in automatic reference counting mode
- [Bert]: Calculation of last ave state when training tasks with similar Bert semantics
猜你喜欢

以银行异业合作为例,浅谈小程序生态的建设

Differences between beanfactory and factorybean

Tree topology networking structure of ZigBee module communication protocol

图片规则翻页

What are the functions and applications of Mogg test controller

安装MySQL ,出现由于找不到 MSVCR120.dll,无法继续执行代码解决方法”

MySQL transaction

ZigBee模块通信协议的树形拓扑组网结构

Internet of things security in the era of remote work

UGUI鼠标点击扩散UI效果
随机推荐
After four years of outsourcing, it was abandoned
Q1营收超华尔街预期,挚文集团的价值等待回归
【torch】: 并行训练并且可以动态设置第一个gpu的batch size
科技云报道:Web3.0浪潮下的隐私计算
Interview review - closure
以银行异业合作为例,浅谈小程序生态的建设
Introduction to ZigBee module wireless transmission star topology networking structure
图片规则翻页
Wechat applet ordering system with source code
MD5 learning
Use bat to write to the first line of the file
MySQL基础篇常用约束总结上篇
详述用网络分析仪测量DC-DC和PDN
[Bert]: Calculation of last ave state when training tasks with similar Bert semantics
浅谈wandfluh比例阀的功能与作用
Beginning simple blog emlog theme template V3
Dotween usage
Mouse click coordinate transformation generation
WordPress website backup
安装MySQL ,出现由于找不到 MSVCR120.dll,无法继续执行代码解决方法”