note 16516 deleted from function.gregoriantojd by nlopess

From: Date: Sat, 22 Apr 2006 12:30:52 +0000
Subject: note 16516 deleted from function.gregoriantojd by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-109008@lists.php.net to get a copy of this message
Note Submitter: ---- Just in case you don't have the calendar functions bound into the PHP you're using, here's a replacement... function GregorianToJD ($month,$day,$year) { if ($month > 2) { $month = $month - 3; } else { $month = $month + 9; $year = $year - 1; } $c = floor($year / 100); $ya = $year - (100 * $c); $j = floor((146097 * $c) / 4); $j += floor((1461 * $ya)/4); $j += floor(((153 * $month) + 2) / 5); $j += $day + 1721119; return $j; }

« previous php.notes (#109008) next »