PHP cal_to_jd()Functions
Examples
Convert June 20, 2007 (Gregorian calendar) to Julian Day Count:
<?php
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);
echo $d;
?>
Run example »
Definition and Usage
The cal_to_jd() function converts a date in the specified calendar to a Julian Day Count.
Syntax
cal_to_jd(calendar,month,day,year);
| Parameter | Description |
|---|---|
| calendar | Required. Specifies the calendar to use. Must be one of the following constants:
|
| month | Required. A number specifying the month. |
| day | Required. A number specifying the day. |
| year | Required. A number specifying the year. |
Technical Details
| Return value: | Returns the Julian Day number. |
|---|---|
| PHP Version: | 4.1+ |
PHP Calendar Reference Manual Other Extensions