PHP cal_days_in_month()関数
例
指定した年とカレンダーの1か月の日数を取得します。
<?php
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo "There was $d days in October 2005";
?>
定義と使用法
cal_days_in_month()関数は、指定された年とカレンダーの1か月の日数を返します。
構文
cal_days_in_month(calendar,month,year);
パラメータ値
Parameter | Description |
---|---|
calendar | Required. Specifies the calendar to use. Look at the PHP Calendar Constants |
month | Required. Specifies the month in the selected calendar |
year | Required. Specifies the year in the selected calendar |
技術的な詳細
戻り値: | 指定された年およびカレンダーにおける、選択された月の日数 |
---|---|
PHPバージョン: | 4.1+ |
❮PHPカレンダーリファレンス