The cal_from_jd() function converts a Julian day count into a date of a specified calendar.
PHP cal_from_jd() Function has the following syntax.
cal_from_jd(jd,calendar);
Parameter | Is Required | Description |
---|---|---|
jd | Required. | Julian Day as an integer |
calendar | Required. | Calendar to convert to. |
Calendar must be one of the following values:
PHP cal_from_jd() Function returns an array that contains calendar information.
Converts a Julian day count into a date of a specified calendar
<?php
$d=unixtojd(mktime(0,0,0,6,20,2013));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>
The code above generates the following result.