public static function valid($str)
    {
        if (!is_numeric($str) && !is_string($str)) {
            return false;
        }

        $str = strval($str);

        $parts = array_pad(self::getParts($str), 7, '');

        if (in_array('', $parts, true)) {
            return false;
        }

        list($century, $year, $month, $day, $sep, $num, $check) = array_values($parts);

        $validDate = checkdate($month, $day, strval($century) . strval($year));
        $validCoOrdinationNumber = checkdate($month, intval($day) - 60, strval($century) . strval($year));

        if (!$validDate && !$validCoOrdinationNumber) {
            return false;
        }

        $valid = self::luhn($year . $month . $day . $num) === intval($check);

        return $valid;
    }