PHP cal_info() 函数 |
发布时间: 2012/9/8 16:11:03 |
定义和用法cal_info() 函数返回一个数组,其中包含了关于给定历法的信息。
所返回的数组包含这些元素:calname, calsymbol, month, abbrevmonth 以及 maxdaysinmonth。
语法cal_from_jd(jd,calendar) 计算机学习网站www.boydavid.com
提示和注释提示:在 PHP 5 中,如果没有指定 calendar 参数,则返回所有被支持的历法的信息。
例子<?php
$calinfo=cal_info(0);
print_r($calinfo);
?>
输出:
Array
(
[months] => Array
(
[1] => January
[2] => February
[3] => March
[4] => April
[5] => May
[6] => June
[7] => July
[8] => August
[9] => September
[10] => October
[11] => November
[12] => December
)
[abbrevmonths] => Array
(
[1] => Jan
[2] => Feb
[3] => Mar
[4] => Apr
[5] => May
[6] => Jun
[7] => Jul
[8] => Aug
[9] => Sep
[10] => Oct
[11] => Nov
[12] => Dec
)
[maxdaysinmonth] => 31
[calname] => Gregorian
[calsymbol] => CAL_GREGORIAN
)
本文出自:亿恩科技【www.enkj.com】 |