note 32668 deleted from function.mcal-is-leap-year by philip

From: Date: Fri, 28 Nov 2008 19:40:52 +0000
Subject: note 32668 deleted from function.mcal-is-leap-year by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147122@lists.php.net to get a copy of this message
Note Submitter: wixson at umr dot edu ---- Leap Year Check // pass a 4digit year // works for me 1969-2037, will need fix out of that range // The Gregorian Leap Year Rule function Gr_IsLeapYr ($yr) { $isleap=0; if ($yr % 4 == 0) { // Years evenly divisible by 4 are leap years. $isleap=1; // Exception: Centurial years that are not evenly divisible by 400. if ( $yr % 100 == 0 && $yr % 400 != 0) { // not a leap year $isleap=0; } } return $isleap; } // end Gr_IsLeapYear

« previous php.notes (#147122) next »