PHP cal_to_jd () function
Examples
The June 20, 2007 (Gregorian calendar) is converted to Julian day count:
<?php
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
Running instance »
Definition and Usage
cal_to_jd () function to convert the specified calendar dates to Julian day count.
grammar
cal_to_jd( calendar,month,day,year);
参数 | 描述 |
---|---|
calendar | 必需。规定要使用的历法。必须为下面这些常量之一:
|
month | 必需。一个数字,规定月。 |
day | 必需。一个数字,规定日。 |
year | 必需。一个数字,规定年。 |
technical details
return value: | Returns the Julian day numbers. |
---|---|
PHP version: | 4.1+ |
PHP Calendar Reference Manual