PHP cal_from_jd () function
Examples
Julian day count to a Gregorian calendar date:
<?php
$d=unixtojd(mktime(0,0,0,6,20,2007));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>
$d=unixtojd(mktime(0,0,0,6,20,2007));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>
Running instance »
Definition and Usage
cal_from_jd () function to convert a Julian day count for the specified calendar date.
grammar
cal_from_jd( jd,calendar);
参数 | 描述 |
---|---|
jd | 必需。一个数字(儒略日计数)。 |
calendar | 必需。规定要使用的历法。可以使用下面这些常量:
|
technical details
return value: | It returns an array containing the following calendar information:
|
---|---|
PHP version: | 4.1+ |
PHP Calendar Reference Manual