PHP juliantojd() Function
Definition
The juliantojd() function converts a date from the Julian Calendar to a Julian Day Count.
Syntax
juliantojd(month,day,year);
Parameter
Parameter | Is Required | Description |
---|---|---|
month | Required. | Month value as a number from 1 to 12 |
day | Required. | Day value as a number from 1 to 31 |
year | Required. | Year value as a number between -4713 and 9999 |
Return
Convert a Jewish date to a Julian Day Count returns a Julian Day number.
Example
Convert a Julian date to a Julian Day Count and back to a Julian date
<?php//from w w w . j a v a 2s .c om
$jd=juliantojd(6,20,2012);
echo $jd . "\n";
echo jdtojulian($jd);
?>
The code above generates the following result.