PHP cal_to_jd() Function
Example
Convert September 25, 2016 (Gregorian calendar) to Julian Day count:
<?php $d=cal_to_jd(CAL_GREGORIAN,9,25,2016); echo $d; ?>
Definition and Usage
The cal_to_jd() function converts a date in a specified calendar to Julian Day count.
Syntax
cal_to_jd(calendar,month,day,year);
Parameters | Description |
---|---|
calendar |
Required. Specify the calendar to be converted. It must be one of the following constants:
|
month | Required. Specify the month as a number. |
day | Required. Specify the day as a number. |
year | Required. Specify the year as a number. |
Technical Details
Return Value: | Return Julian Day number. |
---|---|
PHP Version: | 4.1+ |