PHP - Function gregoriantojd()
gregoriantojd ( $month, $day, $year );
Definition and Usage
This function Converts a Gregorian date to Julian Day Count. Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D.
|month||Required. The month as a number from 1 (for January) to 12 (for December)|
|day||Required. The day as a number from 1 to 31|
|year||Required. The year as a number between -4714 and 9999|
The julian day for the given gregorian date as an integer.
Try out following example −
<?php $jd = gregoriantojd(10, 11, 1970); echo "$jd"; print "\n"; $gregorian = jdtogregorian($jd); echo "$gregorian"; print "\n"; ?>
This will produce the following result −