framework/utils/CTimestamp.php
public static function isLeapYear($year)
	{
		$year = self::digitCheck($year);
		if ($year % 4 != 0)
			return false;

		if ($year % 400 == 0)
			return true;
		// if gregorian calendar (>1582), century not-divisible by 400 is not leap
		elseif ($year > 1582 && $year % 100 == 0 )
			return false;
		return true;
	}
public static function isLeapYear($year)
	{
		$year = self::digitCheck($year);
		if ($year % 4 != 0)
			return false;

		if ($year % 400 == 0)
			return true;
		// if gregorian calendar (>1582), century not-divisible by 400 is not leap
		elseif ($year > 1582 && $year % 100 == 0 )
			return false;
		return true;
	}
public static function isLeapYear ( $ year ) { $ year = self :: digitCheck ( $ year ) ; if ( $ year % 4 != 0 ) return false ; if ( $ year % 400 == 0 ) return true ; // if gregorian calendar (>1582), century not-divisible by 400 is not leap elseif ( $ year > 1582 && $ year % 100 == 0 ) return false ; return true ; }
Checks for leap year, returns true if it is. No 2-digit year check. Also
handles julian calendar correctly.
@param integer $year year to check
@return boolean true if is leap year
Checks for leap year returns true if it is . No 2 - digit year check . Also handles julian calendar correctly .