src/TimeLib.php
public static function getDaysInMonth($month='', $year='')
    {        
        $firstOfSpecifiedMonth = self::getFirstOfMonth($month, $year);
        $numDays = date("t", $firstOfSpecifiedMonth); 
        return $numDays;
    }
public static function getDaysInMonth($month='', $year='')
    {        
        $firstOfSpecifiedMonth = self::getFirstOfMonth($month, $year);
        $numDays = date("t", $firstOfSpecifiedMonth); 
        return $numDays;
    }
public static function getDaysInMonth ( $ month = '' , $ year = '' ) { $ firstOfSpecifiedMonth = self :: getFirstOfMonth ( $ month , $ year ) ; $ numDays = date ( "t" , $ firstOfSpecifiedMonth ) ; return $ numDays ; }
Fetches the number of days in a given month.

@param month - optional integer representing which month of the year.
e.g. 00 = january
if not specified we assume the current month.
@param year - optional integer representing which year. e.g. 2013 and
not 13
if not specified we assume the current year.

@return numDays - the number of days in that month/year.
Fetches the number of days in a given month .