日志-本周、上周、本月
2018-08-18 PHP 912
日志-本周、上周、本月
//本周 $week_start = date('Y-m-d', (time() - ((date('w') == 0 ? 7 : date('w')) - 1) * 24 * 3600)); $week_end = date('Y-m-d', (time() + (7 - (date('w') == 0 ? 7 : date('w'))) * 24 * 3600)); //上周 $last_week_start = date('Y-m-d', strtotime($week_start) - 7 * 86400); $last_week_end = date('Y-m-d', strtotime($week_end) - 7 * 86400); //本月 $month_start = date('Y-m-d', strtotime(date('Y-m', time()) . '-01 00:00:00')); $month_end = date('Y-m-d', strtotime(date('Y-m', time()) . '-' . date('t', time()) . ' 00:00:00'));
很赞哦! (0)
相关文章
文章评论
-
-
-
0条评论