def year_to_numbers(year):
    """
    Convert the given year into an array of digits.

    e.g. year_to_numbers(1990) -> [1, 9, 9, 0]
    """
    result = []
    for i in 1000,100,10,1:
        result.append(int(year / i))
        year = year % i
    return result