请输入您要查询的百科知识:

 

词条 cal_info
释义

定义和用法

cal_info() 函数返回一个数组,其中包含了关于给定历法的信息。

所返回的数组包含这些元素:calname, calsymbol, month, abbrevmonth 以及 maxdaysinmonth。

语法

cal_from_jd(jd,calendar)

参数 描述

calendar 必需。规定要使用的历法。可以使用下面这些常量:

CAL_GREGORIAN

CAL_JULIAN

CAL_JEWISH

CAL_FRENCH

提示和注释

提示:在 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 )PHP Array 函数

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/1/11 3:11:04