The GregorianToJD() function converts a Gregorian date to a Julian day count. It returns a Julian day number.
Note − The valid range for the Gregorian calendar is from November 25, 4714 B.C. to at least December 31, 9999 A.D.
Syntax
GregorianToJD(month, date, year)
Parameters
month − Specifies the month as a number from 1 to 12
date − Specifies the day as a number from 1 to 31
year −Specifies the year as a number between -4714 and 9999
Return
The GregorianToJD() function returns a Julian day number.
Example
The following is an example −
<?php $jd = gregoriantojd(9,27,2017); echo $jd . "<br>"; echo jdtogregorian($jd); ?>
Output
2458024 9/27/2017