import re


def invalid_year_format(command_line_arguments):
	"""Checks the input year format, if invalid returns true."""
	year_input_string = command_line_arguments.year
	if year_input_string and re.search(r"^\d+(-){1}\d+((,){1}(\s){1}\d+(-){1}\d+)*$", year_input_string) is None:
		return True
	return False