PHP cal_from_jd()Functions
Examples
Convert a Julian day count to a Gregorian date:
<?php
$d=unixtojd(mktime(0,0,0,6,20,2007));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>
$d=unixtojd(mktime(0,0,0,6,20,2007));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>
Run example »
Definition and Usage
The cal_from_jd() function converts a Julian day count to a date in a specified calendar.
Syntax
cal_from_jd(jd,calendar);
| Parameters | Description |
|---|---|
| jd | Required. A number (Julian day count). |
| calendar | Required. Specifies the calendar to use. The following constants can be used:
|
Technical Details
| Return value: | Returns an array containing the following calendar information:
|
|---|---|
| PHP Version: | 4.1+ |
PHP Calendar Reference Manual Other Extensions