/** * Returns the number of days in a year/month pair * @param int $year * @param int $month * @return int the number of days in the month */ public static function daysInMonth($year, $month) { if ($month == 4 || $month == 6 || $month == 9 || $month == 11) { return 30; } else { if ($month != 2) { return 31; } } return 28 + RepeatRuleDateTime::hasLeapDay($year); }