note 32668 added to function.mcal-is-leap-year

From: Date: Wed, 04 Jun 2003 05:35:43 +0000
Subject: note 32668 added to function.mcal-is-leap-year
Groups: php.notes 
Request: Send a blank email to php-notes+get-49685@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.mcal-is-leap-year.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32668 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32668&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32668&report=yes

« previous php.notes (#49685) next »