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 did not stabilize 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 universally used calendar today is the Gregorian calendar. The gregoriantojd() function is used to convert these dates to their Julian Day count.

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

Syntax

juliantojd(month,day,year);
Parameters Description
month Required. Required. Specify the month from 1 to 12, numeric value.
day Required. Specify the day between 1 and 31, numeric value.
year Required. Specify the year between -4713 and 9999, numeric value.

Technical Details

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