Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

mcal_is_leap_year

(PHP 3 >= 3.0.13, PHP 4, PECL)

mcal_is_leap_year --  Returns if the given year is a leap year or not

Description

bool mcal_is_leap_year ( int year )

mcal_is_leap_year() returns 1 if the given year is a leap year, 0 if not.



add a note add a note User Contributed Notes
mcal_is_leap_year
wixson at umr dot edu
04-Jun-2003 12:35
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

mcal_list_alarms> <mcal_fetch_event
Last updated: Fri, 26 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571