![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
time
文章平均质量分 72
红尘007
这个作者很懒,什么都没留下…
展开
-
php 获取时间
```php /** * 获取指定时间的本月起止时间 * @param $time int * @return mixed 11 */ function currentMonth($time) { $info['start'] = strtotime(date( 'Y-m-1 00:00:00', $time )); $mdays = date( 't',...原创 2020-04-21 18:28:12 · 132 阅读 · 0 评论 -
php获取指定时间的本月/上月/本年/上年的开始时间和结束时间
/** * 获取指定时间的本月起止时间 * @param $time int * @return mixed 11 */ function currentMonth($time) { $info['start'] = strtotime(date( 'Y-m-1 00:00:00', $time )); $mdays = date( 't', $time )...原创 2020-03-31 15:49:32 · 1099 阅读 · 0 评论 -
php计算两个时间相差的天数、小时数、分钟数、秒数
$start : 开始时间戳 $end : 结束时间戳 $days = floor($start-$end)/86400; //天 $houes = floor($start-$end)%86400/3600; //小时 $minutes = floor($start-$end)%86400/60; //分钟 $seconds = floor($start-$end)%86400%60...原创 2019-05-23 09:43:13 · 1839 阅读 · 0 评论