PHP cal_from_jd() Function
Complete PHP Calendar Reference
Definition and Usage
The cal_from_jd() function converts the specified Julian day into a date of
the specified calendar.
Syntax
| Parameter |
Description |
| jd |
Required. A number (a Julian day count) |
| calendar |
Required. Specifies the calendar to use. The following
calendar values can be used:
- CAL_GREGORIAN
- CAL_JULIAN
- CAL_JEWISH
- CAL_FRENCH
|
Example
<?php
$d=unixtojd(mktime(0,0,0,1,18,2006));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>
|
The output of the code above will be:
Array
(
[date] => 1/18/2006
[month] => 1
[day] => 18
[year] => 2006
[dow] => 3
[abbrevdayname] => Wed
[dayname] => Wednesday
[abbrevmonth] => Jan
[monthname] => January
)
|
Complete PHP Calendar Reference

The Altova MissionKit, recent winner of the Jolt Product Excellence and Productivity Award for Best Development Environment,
is an integrated suite of tools ideal for:
- XML development
- Web & Web services development
- Data mapping & integration
- Rendering & publishing XML & database data
- XBRL validation, taxonomy editing, transformation & rendering
The MissionKit for XML Developers includes XMLSpy®, MapForce®, and StyleVision® plus 3 additional tools for less than the price of 2.
Try all 6 products free for 30 days!
Download a fully-functional free trial
|
|
|
|