标签:php
<?php function yearMonthDays($year,$month){ if (in_array($month, array(1, 3, 5, 7, 8, 01, 03, 05, 07, 08, 10, 12))) { return ‘31‘; }elseif ($month == 2){ if ($year % 400 == 0 || ($year % 4 == 0 && $year % 100 !== 0)) { //判断是否是闰年 return ‘29‘; }else{ return ‘28‘; } } else { return ‘30‘; } }
标签:php
原文地址:http://raoyonggang.blog.51cto.com/8827770/1536051