English

# Php Calendar Julian Day Count Functions

What are the Julian Day Count Functions?

## Explanation

cal_to_jd Function:

### Syntax:

int cal_to_jd ( int \$calendar, int \$month , int \$day , int \$year )

The above function calculates the Julian day count for a date in the specified calendar. It supports GREGORIAN, JULIAN, JEWISH, FRENCH calendars.
cal_from_jd Function:

### Syntax:

array cal_from_jd ( int \$jd, int \$calendar )

The above function Julian day provided into a date of the specified calander. It supports GREGORIAN, JULIAN, JEWISH, FRENCH calendars.
FrenchToJD Function:

### Syntax:

int frenchtojd (int \$month, int \$day, int \$year)

The above function converts a date from the French Republican Calendar to a Julian Day Count. The year should be between 1 and 14, days from 1 to 30, month from 1 to 13.
GregorianToJD Function:

### Syntax:

int gregoriantojd (int \$month, int \$day, int \$year)

The above function converts a Gregorian date to Julian Day Count. The year should be from -4714 and 9999, month from 1 to 1, days from from 1 to 31.
JDDayOfWeek Function:

### Syntax:

mixed jddayofweek (int \$julianday [, int \$mode= CAL_DOW_DAYNO ] )

The above function returns the day of a week based on the mode as integer or string. In "Mode 0" it returns integer ,using "Mode 1" it returns a string of the day, using "Mode 2" it returns an abbreviated string.
JDMonthName Function:

### Syntax:

string jdmonthname ( int \$julianday, int \$mode)

The above function returns the name of the month, basedon the "Mode". If "Mode 0" for abbreviated-gregorian, "Mode 1" for gregorian,"Mode 2" for Julian abbreviated, "Mode 3" for Julian, "Mode 4" for Jewish, "Mode 5" for French Republican calendars.
JDToFrench Function:

### Syntax:

string jdtofrench (int \$juliandaycount)

The above code converts the Julian Day Count to the French Republican Calander.
JDToGregorian Function:

### Syntax:

string jdtogregorian ( int \$julianday )

The above function converts the Julian Day Count to Gregorian Date.
JDToJewish

### Syntax:

string jdtojewish (int \$juliandaycount
[,bool \$hebrew= false [,int \$fl= 0 ]])

The above function converts Julian Day Count to the Jewish Calander. The hebrew parameter should be set to "True", "f1" parameter is used to store the hebrew output character.
JDToJulian

### Syntax:

string jdtojulian (int \$julianday)

The above function is used to convert Julian Day Count to Julian Calendar Date.
JDtounix

### Syntax:

int jdtounix (int \$jday)

The above function will return a Unix timestamp corresponding to the Julian Day given in the parameter jday.
JewishToJD

### Syntax:

int jewishtojd ( int \$month, int \$day, int \$year)

The above function converts a date in Jewish Calander to Julian Day Count.
JulianToJD

### Syntax:

int juliantojd ( int \$month, int \$day, int \$year)

The above function converts a Julian Calendar Date to Julian Date Count. The valid range of Julian Calendar is from 4713 B.C. to 9999 A.D.
unixToJD

### Syntax:

int unixtojd ([ int \$timestamp= time() ] )

The above function converts a unix timestamp to julian day.