cal_info() 函数返回选定历法的信息
cal_info ( [$calendar] );
cal_info()函数返回一个数组,其中包含有关给定日历的信息。该数组包含以下元素:calname,calsymbol,month,abbrevmonth和maxdaysinmonth。
序号 | 参数及说明 |
---|---|
1 | calendar 可选的。指定历法。可以使用以下历法值-
|
包含有关给定日历信息的数组。返回信息所指定的历法名称,如果没有指定历法,将返回所有历法。
<?php $info = cal_info(0); print_r($info); ?>
输出结果:
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 )