当前位置:网站首页>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
边栏推荐
- 转载:LinearLayout+Fragment实现下导航栏效果
- Cas de rectification du CEM rayonné par des équipements électroniques
- Detailed explanation of Lora module wireless transceiver communication technology
- 面试复习之---闭包
- Habitable planet
- Dynamically render data and carousels
- Tree topology networking structure of ZigBee module communication protocol
- TikTok在英国遭遇文化冲突,短期内众多员工离职
- 详解2.5G/5G/10G Base-T以太网接口物理层一致性测试!
- 鼠标点击坐标转换生成
猜你喜欢

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

ZigBee模块无线传输星形拓扑组网结构简介

Jedislock redis distributed lock implementation

MySQL basic learning notes 03

LoRa模块无线收发通信技术详解

How much do you know about the functions and functions of Rexroth solenoid directional valve

Datagrip 2022, datagrip function

Beginning simple blog emlog theme template V3

Ugui mouse click diffusion UI effect

iPhone 15 被迫用上 Type-C 接口
随机推荐
Batch add noise to data and generate new named annotation files
远程监控项目离线日志说明书
NGUI,冷却效果
Use bat to write to the first line of the file
Interview review - closure
你对软件兼容性测试知道多少?如何选择软件兼容性测试机构?
Bcgcontrolbar Library Professional Edition, fully documented MFC extension class
FPGA infrastructure [reference ug998]
Ugui picture wall
Wechat applet ordering system with source code
以银行异业合作为例,浅谈小程序生态的建设
ZigBee模块无线传输星形拓扑组网结构简介
Unity字体间距
Reprint: linearlayout+fragment to achieve the lower navigation bar effect
有哪些ABAP关键字和语法,到了ABAP云环境上就没办法用了?
【高并发】关于线程池,蚂蚁金服面试官问了我这些内容!!
MySQL permission management and backup
Empire CMS imitates DIY handmade website source code of craft activity /92kaifa imitates self-adaptive mobile phone version template of craft activity
WordPress网站备份
电子设备辐射EMC整改案例