直接上代码:
/** 获取当月有多少天* @param date $unix* return int*/public static function getDaysByMonth($unix){$month = date('m', $unix);$year = date('Y', $unix);$nextMonth = (($month+1)>12) ? 1 : ($month+1);$year = ($nextMonth>12) ? ($year+1) : $year;$days = date('d',mktime(0,0,0,$nextMonth,0,$year));return $days;}
本文链接:https://my.lmcjl.com/post/4282.html
展开阅读全文
4 评论