Hey everyone,
I need to convert my Gregorian Date to Julian. the following script produces the following date: 2452718
which according to World Date Pages on the web, the correct Julian Date is: 2452840
$a = floor((14-$month)/12);
$y = floor($year+4800-$a);
$m = floor($month+12$a-3);
$datejulian = $day+floor((153m+2)/5)+$y*365;
$datejulian += floor($y/4)-floor($y/100)+floor($y/400)-32045;
When I try to use the function:
$datejulian = GregorianToJD (07,19,2003);
echo "$datejulian\n";
$dategregorian = JDToGregorian ($jd);
echo "$dategregorian\n";
My server returns an error saying it can't find the function. I'm currently using PHP 4.0.6. This will be upgraded at the end of the month to 4.3.2.
Is the server PHP software version the problem?
Thanks much,
Gary