public static function calDaysInMonth($calendar_id, $month, $year)
    {
        switch ($calendar_id) {
            case CAL_FRENCH:
                return self::calDaysInMonthFrench($year, $month);

            case CAL_GREGORIAN:
                return self::calDaysInMonthCalendar(self::$gregorian_calendar, $year, $month);

            case CAL_JEWISH:
                return self::calDaysInMonthCalendar(self::$jewish_calendar, $year, $month);

            case CAL_JULIAN:
                return self::calDaysInMonthCalendar(self::$julian_calendar, $year, $month);

            default:
                return trigger_error('invalid calendar ID ' . $calendar_id, E_USER_WARNING);
        }
    }
public static function calDaysInMonth($calendar_id, $month, $year)
    {
        switch ($calendar_id) {
            case CAL_FRENCH:
                return self::calDaysInMonthFrench($year, $month);

            case CAL_GREGORIAN:
                return self::calDaysInMonthCalendar(self::$gregorian_calendar, $year, $month);

            case CAL_JEWISH:
                return self::calDaysInMonthCalendar(self::$jewish_calendar, $year, $month);

            case CAL_JULIAN:
                return self::calDaysInMonthCalendar(self::$julian_calendar, $year, $month);

            default:
                return trigger_error('invalid calendar ID ' . $calendar_id, E_USER_WARNING);
        }
    }
public static function calDaysInMonth ( $ calendar_id , $ month , $ year ) { switch ( $ calendar_id ) { case CAL_FRENCH : return self :: calDaysInMonthFrench ( $ year , $ month ) ; case CAL_GREGORIAN : return self :: calDaysInMonthCalendar ( self :: $ gregorian_calendar , $ year , $ month ) ; case CAL_JEWISH : return self :: calDaysInMonthCalendar ( self :: $ jewish_calendar , $ year , $ month ) ; case CAL_JULIAN : return self :: calDaysInMonthCalendar ( self :: $ julian_calendar , $ year , $ month ) ; default : return trigger_error ( 'invalid calendar ID ' . $ calendar_id , E_USER_WARNING ) ; } }
Return the number of days in a month for a given year and calendar.

Shim implementation of cal_days_in_month()

@link https://php.net/cal_days_in_month
@link https://bugs.php.net/bug.php?id=67976

@param int $calendar_id
@param int $month
@param int $year

@return int|bool The number of days in the specified month, or false on error
Return the number of days in a month for a given year and calendar .