note 39100 deleted from function.gregoriantojd by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 16 Jan 2004 22:55:43 +0000 |
| Subject: | note 39100 deleted from function.gregoriantojd by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63711@lists.php.net to get a copy of this message | ||
Note Submitter:
----
Previous example has semicolon missing. Correct to
function GregorianToJD($month, $day, $year)
{
$a = floor((14-$month)/12);
$y = floor($year+4800-$a);
$m = floor($month+12*$a-3);
$jd = $day+floor((153*m+2)/5)+$y*365;
$jd += floor($y/4)-floor($y/100)+floor($y/400)-32045;
return $jd;
}