PHP JulianToJD() Function

Example

Convert Julian calendar date to Julian Day count and then back to Julian calendar date:

<?php
$jd=juliantojd(9,25,2016);
echo $jd . "<br>";
echo jdtojulian($jd);
?>

Run Example

Definition and Usage

juliantojd() converts Julian calendar dates to Julian Day count.

Note:The valid date range for the function is from the year -4713 BC to AD 9999. The function can calculate to -4713 BC, but this is not very meaningful. The Julian calendar was established in 46 BC, but some details were stabilized until 8 AD. Different cultures define the start of the year differently - not all countries agree that January is the first month of the year. Remember that the Gregorian calendar is the universally accepted calendar at present. The gregoriantojd() function is used to convert these dates to their Julian Day count.

Tip:See jdtojulian() The function converts Julian Day count to Julian calendar date.

Syntax

juliantojd(month,day,year);
Parameter Description
month Required. Required. Specifies a month from 1 to 12, numerical value.
day Required. Specifies a day between 1 and 31, numerical value.
year Required. Specifies a year between -4713 and 9999, numerical value.

Technical Details

Return Value: Return Julian Day number.
PHP Version: 4+