PHP cal_from_jd() Function

PHP cal_from_jd Function


Definition : 

In php The PHP cal_from_jd() function is used to converts the Julian day count into a date of the specified calendar. Supported calendars by this function are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH and CAL_FRENCH.

Syntax

     cal_from_jd(jd,calendar);

Parameter:
Parameter Description
jd Required. Specifies a Julian Day as an integer
calendar Required. Specifies the calendar to convert to. Must be one of the following values:
  • CAL_GREGORIAN
  • CAL_JULIAN
  • CAL_JEWISH
  • CAL_FRENCH

Let's understand with an example given below

Output :

(
    [date] => 5/15/2010
    [month] => 5
    [day] => 15
    [year] => 2010
    [dow] => 6
    [abbrevdayname] => Sat
    [dayname] => Saturday
    [abbrevmonth] => May
    [monthname] => May
)