PHP cal_from_jd() function
Example
Convert Julian Day counting 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 Julian Day counting 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. It must be one of the following values:
|
Technical Details
Return value: |
Return an array containing the following calendar information:
|
---|---|
PHP Version: | 4.1+ |