cal_days_in_month

(PHP 4 >= 4.1.0, PHP 5)

cal_days_in_month --  指定した年とカレンダについて、月の日数を返す

説明

int cal_days_in_month ( int calendar, int month, int year )

この関数は、指定した calendar について yearmonth 月の 日数を返します。

例 1. cal_days_in_month() の例

<?php
$num
= cal_days_in_month(CAL_GREGORIAN, 8, 2003); // 31
echo "2003 年 8 月の日数は $num 日です";
?>

jdtounix() も参照ください。