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()関数は、指定された年とカレンダーの月の日数を返します。
構文
<div>cal_days_in_month(<em>calendar,month,year);</em></div>
パラメータ値
| パラメータ | 説明 |
|---|---|
| calendar | Required 使用するカレンダーを指定します。PHP カレンダー定数を見てください |
| month | Required 選択したカレンダーの月を指定します |
| year | Required 選択したカレンダーの年を指定します |
Technical Details
| Return Value: | 指定された年とカレンダーにおける、選択された月の日数 |
|---|---|
| PHP バージョン: | 4.1+ |