Convert Julian day counts to Gregorian dates:
<?php$d=unixtojd(mktime(0,0,0,6,20,2007));print_r(cal_from_jd($d,CAL_GREGORIAN));?>The cal_from_jd() function converts a Julian day count to a date in the specified calendar.
cal_from_jd( jd,calendar);
parameter | describe |
---|---|
jd | Required. A number (Julian day count). |
calendar | Required. Specifies the calendar to be used. The following constants can be used: CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH |
Return value: | Returns an array containing the following calendar information: Date in the form "month/day/year" moon Year day of the week Abbreviation and full name of weekday and month |
---|---|
PHP version: | 4.1+ |