Convert June 20, 2007 (Gregorian calendar) to Julian day counting:
<?php$d=cal_to_jd(CAL_GREGORIAN,6,20,2007);echo $d;?>The cal_to_jd() function converts a date in the specified calendar to a Julian day count.
cal_to_jd( calendar,month,day,year);
parameter | describe |
---|---|
calendar | Required. Specifies the calendar to be used. Must be one of the following constants: CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH |
month | Required. A number specifying the month. |
day | Required. A number specifying the day. |
year | Required. A number specifying the year. |
Return value: | Returns the Julian day number. |
---|---|
PHP version: | 4.1+ |