PHP cal_from_jd() Function
Example
Convert the Julian Day count to the Gregorian calendar date:
<?php $d=unixtojd(mktime(0,0,0,9,25,2016)); print_r(cal_from_jd($d,CAL_GREGORIAN)); ?>
Definition and Usage
The cal_from_jd() function converts the Julian Day count to the date of the specified calendar.
Syntax
cal_from_jd(jd,calendar);
Parameters | Description |
---|---|
jd | Required. Specifies the Julian Day as an integer. |
calendar | Required. Specifies the calendar to be converted to. It must be one of the following values:
|
Technical Details
Return value: |
Returns an array containing the following calendar information:
|
---|---|
PHP Version: | 4.1+ |