<p >cal_days_in_month<br />
(PHP 4 >= 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 ><?php<br />
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31<br />
echo "There was $num days in August 2003";<br />
?></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>