Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP juliantojd() Function

PHP juliantojd() Function

PHP Calendar Reference Manual PHP Calendar Reference Manual

Example

Convert a Julian calendar date to a Julian day count and then back to a Julian calendar date:

"; echo jdtojulian($jd); ?>

Run Example »


Definition and Usage

juliantojd() converts a Julian calendar date to a Julian day count.

**Note:** The valid range of dates handled by this function is from 4713 B.C. in the Julian calendar to 9999 A.D. The function can calculate back to 4713 B.C., but this is not very meaningful. The Julian calendar was established in 46 B.C., but some details were not stabilized until 8 A.D. Different cultures defined the start of the year differently - not all countries agreed that January was the first month of the year. Keep in mind that the calendar in common use worldwide today is the Gregorian calendar.gregoriantojd() function is used to convert these dates to their Julian day counts.

**Tip:** See the jdtojulian() function converts a Julian day count to a Julian calendar date.

Syntax

juliantojd(

month,day,year);

Parameters Description
month Required. A number from 1 to 12 specifying the month.
day Required. A number from 1 to 31 specifying the day.
year Required. A number from -4713 to 9999 specifying the year.

Technical Details

Return Value: Returns the Julian day number.
PHP Version: 4+

PHP Calendar Reference Manual PHP Calendar Reference Manual