当前位置:网站首页>php 判断是不是同一个月
php 判断是不是同一个月
2022-04-21 06:38:00 【Mars慕容】
protected function isSameMonth($time1, $time2)
{
$m1 = date('Ym', strtotime($time1));
$m2 = date('Ym', strtotime($time2));
// 必须判断年份,不然2019-8和2020-8会被认为同一月
if($m1 == $m2){
return true;
}
return false;
}
版权声明
本文为[Mars慕容]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_38324424/article/details/106851219
边栏推荐
- Ruijie eg easy gateway remote command execution vulnerability-1
- GeoServer 2.20.1 解决跨域问题 CORS
- 【WPF】利用RadioButton制作导航条
- Leetcode 1387.将整数按权重排序(Sort Integers by The Power Value)
- 論文閱讀:Measuring the Impact of a Successful DDoS Attack on the Customer Behaviour of Managed DNS Servi
- URL Parsing
- leetcode 27.移除元素
- 在vscode 中安装go插件并配置go环境以运行go
- 服务器基本的安全防护设置
- Panic and Recover
猜你喜欢

远程唤醒服务器

论文阅读:Supporting Early and Scalable Discovery of Disinformation Websites

【WPF】自定义控件

Steps for umlet beginners

H + background UI framework, click the button to create a new tab

Implementation of crud of user management system with JDBC

论文阅读:Social Media and Fake News in the 2016 Election

2020-12-21至2022-1-2:解析观察者模式

DOS command kills process

pip list 中已有的模块为什么没法在新project中使用,已解决
随机推荐
(2022.1.31-2022.2.14)模板模式解析
GeoServer 2.20.1 解决跨域问题 CORS
解释器模式(3.7-3.13)
2022-1-3至2022-1-16 访问者模式
关于数据治理平台中数据仓库ODS、DW和DM概念理解
JSON encoding and decoding
Leetcode 1387.将整数按权重排序(Sort Integers by The Power Value)
音乐 下载 等文件名都变成了相同的名字的解决方法
db2相关操作知识点积累及WINDOWS环境DB2连接远程数据库实例
浏览器跨域问题小结
【C#】LINQ
EF 去重操作
论文阅读:The Chain of Implicit Trust: An Analysis of the Web Third-party Resources Loading
Studio3t 过期激活办法/以及重新设置使用日期的脚本不可用解决办法/Studio 3T无限激活原创
2022.2.14-2.27 责任链模式
Implementation of crud of user management system with JDBC
leetcode 209. 长度最小的子数组
pip list 中已有的模块为什么没法在新project中使用,已解决
Navicat连Oracle报错[No matching authentication protocol]
Signals