(PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)
cal_days_in_month — 返回某個(gè)歷法中某年中某月的天數
$calendar, int $month, int $year): int
該函數返回特定歷法中的某年中的某月的天數。
calendar用來(lái)計算的某個(gè)歷法
month選定歷法中的某月
year選定歷法中的某年
指定歷法中選定的某月的天數。
示例 #1 cal_days_in_month() example
<?php
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There was $num days in August 2003";
?>