public static function daysList($days)
    {
        foreach($days as $day)
        {
            // if it isn't negative, it's positive
            $day = ltrim($day, "+");
            $day = trim($day);

            $ordwk = 1;
            $weekday = false;

            if (strlen($day) === 2)
            {
                $weekday = $day;
            }
            else
            {
                list($ordwk, $weekday) = sscanf($day, "%d%s");
            }

            if (!self::weekDay($weekday) || !self::ordWk(abs($ordwk)))
            {
                return false;
            }
        }

        return true;
    }
public static function daysList($days)
    {
        foreach($days as $day)
        {
            // if it isn't negative, it's positive
            $day = ltrim($day, "+");
            $day = trim($day);

            $ordwk = 1;
            $weekday = false;

            if (strlen($day) === 2)
            {
                $weekday = $day;
            }
            else
            {
                list($ordwk, $weekday) = sscanf($day, "%d%s");
            }

            if (!self::weekDay($weekday) || !self::ordWk(abs($ordwk)))
            {
                return false;
            }
        }

        return true;
    }
public static function daysList ( $ days ) { foreach ( $ days as $ day ) { // if it isn't negative, it's positive $ day = ltrim ( $ day , "+" ) ; $ day = trim ( $ day ) ; $ ordwk = 1 ; $ weekday = false ; if ( strlen ( $ day ) === 2 ) { $ weekday = $ day ; } else { list ( $ ordwk , $ weekday ) = sscanf ( $ day , "%d%s" ) ; } if ( ! self :: weekDay ( $ weekday ) || ! self :: ordWk ( abs ( $ ordwk ) ) ) { return false ; } } return true ; }
Test if array of days is valid

@param  array    $days
@return bool
Test if array of days is valid