PHP cal_days_in_month() 函数

定义和用法

cal_days_in_month() 函数针对指定的年份和日历,返回一个月中的天数。

语法

cal_days_in_month(calendar,month,year)
参数 描述
calendar 必需。规定要使用的历法。
month 必须。规定月。
year 必须。规定年。

例子

<?php
$d=cal_days_in_month(CAL_GREGORIAN,10,2005);
echo("There was $d days in October 2005");
?>

输出:

There was 31 days in October 2005
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南