PHP cal to jd

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : cal_to_jd() function

Description

The cal_to_jd() function calculates the Julian day count for a date in the specified calendar.

Version

(PHP 4 and above)

Syntax

cal_to_jd (calendar, month, day, year) 

Parameters

Name

Description

Required /
Optional

Type

calendar

Supported calendar/values. CAL_GREGORIAN
CAL_JULIAN
CAL_JEWISH
CAL_FRENCH.

Required

Integer

month

The given month.
The valid range depends on the specified calendar.

Required

Integer

day

The given day.
The valid range depends on the specified calendar.

Required

Integer

year

The given year.
The valid range depends on the specified calendar.

Required

Integer

Return value

A Julian Day number.

Value Type : Integer.

Example :

  1. $cal_date = cal_to_jd(CAL_GREGORIAN,11,04,2006);  

  2. echo($cal_date);  

  3. ?>  

Output :

2454044