PHP cal_days_in_month() 函數(shù)
PHP cal_days_in_month() 函數(shù)
實(shí)例
針對(duì)指定的年份和歷法,獲取一個(gè)月中的天數(shù):
<?php
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo "There was $d days in October 2005";
?>
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo "There was $d days in October 2005";
?>
運(yùn)行實(shí)例 ?
定義和用法
cal_days_in_month() 函數(shù)針對(duì)指定的年份和歷法,返回一個(gè)月中的天數(shù)。
語(yǔ)法
cal_days_in_month(calendar,month,year);
參數(shù) | 描述 |
---|---|
calendar | 必需。規(guī)定要使用的歷法。請(qǐng)參閱 PHP Calendar 常量。 |
month | 必需。規(guī)定選定歷法中的月。 |
year | 必需。規(guī)定選定歷法中的年。 |
技術(shù)細(xì)節(jié)
返回值: | 針對(duì)給定的年份和歷法,返回選定月份中的天數(shù)。 |
---|---|
PHP 版本: | 4.1+ |

相關(guān)文章
- PHP 運(yùn)算符
- PHP 文件上傳
- PHP Cookie
- PHP 錯(cuò)誤處理
- PHP JSON
- PHP array_change_key_case() 函數(shù)
- PHP array_merge_recursive() 函數(shù)
- PHP array_multisort() 函數(shù)
- PHP array_reverse() 函數(shù)
- PHP array_uintersect_uassoc() 函數(shù)
- PHP arsort() 函數(shù)
- PHP current() 函數(shù)
- PHP extract() 函數(shù)
- PHP key() 函數(shù)
- PHP natsort() 函數(shù)
- PHP next() 函數(shù)
- PHP pos() 函數(shù)
- PHP rsort() 函數(shù)
- PHP 5 Date/Time 函數(shù)
- PHP Filter 函數(shù)