当前位置:网站首页>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
边栏推荐
- MySQL comparison
- Browserfetcher class for getting started with puppeter
- Mysql--索引
- Cas de rectification du CEM rayonné par des équipements électroniques
- About CI framework batch export to compressed file
- Excellent test engineer must have 4 safety test methods!
- DOtween使用方法
- CISP-PTE XSS基础
- Jedislock redis distributed lock implementation
- 接口调优的大致思路
猜你喜欢

iPhone 15 被迫用上 Type-C 接口

Q1营收超华尔街预期,挚文集团的价值等待回归

Q1营收超预期,满帮为何赢得逆风增长?

吴恩达机器学习课程-第七周

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

Can station B make money?

Practical process of selecting DC-DC switching power supply controller

What are the ABAP keywords and syntax that cannot be used in the ABAP cloud environment?

Empire CMS imitation "game bird" template source code /92kaifa version large mobile game portal template

Mysql-- index
随机推荐
【高并发】关于线程池,蚂蚁金服面试官问了我这些内容!!
详解2.5G/5G/10G Base-T以太网接口物理层一致性测试!
puppeteer入门之 Browser 类
以银行异业合作为例,浅谈小程序生态的建设
Can station B make money?
解读USB3.0测试项目
图表背后的秘密 | 技术指标讲解:唐奇安通道
本人书签常存的地址
Function and function of wandfluh proportional valve
steamVR简介
ZigBee模块无线传输星形拓扑组网结构简介
Puppeter class of puppeter introduction
Streaming computing knowledge
Reprint: linearlayout+fragment to achieve the lower navigation bar effect
Ugui mouse click diffusion UI effect
Initial deployment of Servlet
Technology cloud report: privacy computing under the wave of Web3.0
LoRa模块无线收发通信技术详解
Mouse click coordinate transformation generation
IPhone 15 forced to use type-C interface