【php】判斷月份有多少天


cal_days_in_month — 返回某個歷法中某年中某月的天數

說明 ¶
int cal_days_in_month ( int $calendar , int $month , int $year )
該函數返回特定歷法中的某年中的某月的天數。

參數 ¶
calendar
用來計算的某個歷法

month
選定歷法中的某月

year
選定歷法中的某年

返回值 ¶
指定歷法中選定的某月的天數。
<?php
$num = cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "There was $num days in August 2003";
?>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM