php cal_days_in_month

<p >cal_days_in_month<br /> (PHP 4 &gt;= 4.1.0, PHP 5)</p> <p >cal_days_in_month -- Return the number of days in a month for a given year and calendar<br /> Description<br /> int cal_days_in_month ( int calendar, int month, int year )</p> <p ><br /> This function will return the number of days in the month of year for the specified calendar.</p> <p >例子 1. cal_days_in_month() example</p> <p >&lt;?php<br /> $num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31<br /> echo &quot;There was $num days in August 2003&quot;;<br /> ?&gt;</p> <p ><br /> if (!function_exists('cal_days_in_month'))<span class="Apple-converted-space"></span><br /> {<span class="Apple-converted-space"></span><br /> function cal_days_in_month($calendar, $month, $year)<span class="Apple-converted-space"></span><br /> {<span class="Apple-converted-space"></span><br /> return date('t', mktime(0, 0, 0, $month, 1, $year));<span class="Apple-converted-space"></span><br /> }<span class="Apple-converted-space"></span><br /> }</p>
RangeTime:0.006112s
RangeMem:204.83 KB
返回顶部 留言