← 返回列表

PHP cal_to_jd() 函数

PHP cal_to_jd() 函数 实例 把 2007 年 6 月 20 日(格利高里历法)转换为儒略日计数: <?php $d=cal_to_jd(CAL_GREGORIAN,6,20,2007); echo $d; ?> 定义和用法 cal_to_jd() 函数把指定历法的日期转换为儒略日计数。 语法 cal_to_jd( calendar,month,day,year); 参数 描述 _calendar_ 必需。规定要使用的历法。必须为下面这些常量之一: * CAL_GREGORIAN * CAL_JULIAN * CAL_JEWISH * CAL_FRENCH _month_ 必需。一个数字,规定月。 _day_ 必需。一个数字,规定日。 _year_ 必需。一个数字,规定年。 技术细节 返回值: </th> 返回儒略日数字。 </td> </tr> PHP 版本: </th> 4.1+ </td> </tr> </table> (/images/up.gif) PHP Calendar 参考手册](php-ref- calendar.html), '\n']

PHP cal_to_jd() 函数


实例

把 2007 年 6 月 20 日(格利高里历法)转换为儒略日计数:

<?php  
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);  
echo $d;  
?>

定义和用法

cal_to_jd() 函数把指定历法的日期转换为儒略日计数。

语法

cal_to_jd( calendar,month,day,year);

参数 描述
_calendar_ 必需。规定要使用的历法。必须为下面这些常量之一: * CAL_GREGORIAN * CAL_JULIAN * CAL_JEWISH * CAL_FRENCH
_month_ 必需。一个数字,规定月。
_day_ 必需。一个数字,规定日。
_year_ 必需。一个数字,规定年。

技术细节

返回值:

</th>

返回儒略日数字。

</td> </tr>

PHP 版本:

</th>

4.1+

</td> </tr> </table>
(/images/up.gif) PHP Calendar 参考手册](php-ref- calendar.html), '\n']

打开资源 ↗

交流与评论