PHP cal_info() 函數(shù) |
發(fā)布時(shí)間: 2012/9/8 16:11:03 |
定義和用法cal_info() 函數(shù)返回一個(gè)數(shù)組,其中包含了關(guān)于給定歷法的信息。
所返回的數(shù)組包含這些元素:calname, calsymbol, month, abbrevmonth 以及 maxdaysinmonth。
語(yǔ)法cal_from_jd(jd,calendar) 計(jì)算機(jī)學(xué)習(xí)網(wǎng)站www.boydavid.com
提示和注釋提示:在 PHP 5 中,如果沒(méi)有指定 calendar 參數(shù),則返回所有被支持的歷法的信息。
例子<?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
)
本文出自:億恩科技【1tcdy.com】 服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |