PHP: cal_from_jd() function
Converts from Julian Day Count to a supported calendar
The cal_from_jd() function converts a given Julian day into a date (in the form of an array) of a supported calendar.
Version:
(PHP 4 and above)
Syntax:
cal_from_jd(jd, calendar )
Parameters:
Name | Description | Required / Optional |
Type |
---|---|---|---|
jd | Julian day. | Required | Integer |
calendar | Supported calendar values are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH and CAL_FRENCH. |
Required | Integer |
Return value:
An array containing calendar information.
Value Type: Date
Example:
Sample Output:
Array ( [date] => 1/18/2006 [month] => 1 [day] => 18 [year] => 2006 [dow] => 3 [abbrevdayname] => Wed[dayname] => Wednesday [abbrevmonth] => Jan [monthname] => January )
View the example in the browser
See also
Previous: cal_days_in_month
Next: cal_info
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics