Logo Search packages:      
Sourcecode: zendframework version File versions  Download package

static Zend_Date::checkLeapYear ( year ) [static]

Check a given year for leap year.

integer | array | Zend_Date$yearYear to check

Definition at line 3318 of file Date.php.

References Zend_Date_DateObject::isYearLeapYear().

Referenced by isLeapYear().

        if ($year instanceof Zend_Date) {
            $year = (int) $year->toString(self::YEAR, 'iso');

        if (is_array($year)) {
            if (isset($year['year']) === true) {
                $year = $year['year'];
            } else {
                require_once 'Zend/Date/Exception.php';
                throw new Zend_Date_Exception("no year given in array");

        if (!is_numeric($year)) {
            require_once 'Zend/Date/Exception.php';
            throw new Zend_Date_Exception("year ($year) has to be integer for checkLeapYear()", 0, null, $year);

        return (bool) parent::isYearLeapYear($year);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index