cal_info() 函數(shù)返回選定歷法的信息
cal_info ( [$calendar] );
cal_info()函數(shù)返回一個數(shù)組,其中包含有關給定日歷的信息。該數(shù)組包含以下元素:calname,calsymbol,month,abbrevmonth和maxdaysinmonth。
序號 | 參數(shù)及說明 |
---|---|
1 | calendar 可選的。指定歷法??梢允褂靡韵職v法值-
|
包含有關給定日歷信息的數(shù)組。返回信息所指定的歷法名稱,如果沒有指定歷法,將返回所有歷法。
<?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 )