def create_day_array(start, end):
    """Create an array of one-hour blocks from given start time and 
    end time. Returns an empty array if the start/end time was filled
    as "----", otherwise splits the time given into one-hour objects
    and returns the array of block objects.
    """
    # Ensure input is valid!
    if type(start) != int or type(end) != int:
        raise TypeError('Start and End times must be a valid integer.')

    if (start < 8 and start != -1) or (start > 22):
        raise ValueError('Start value must be in appropriate range.')

    if (end < 8 and end != -1) or (end > 22):
        raise ValueError('End value must be in appropriate range.')
        
    day = []
    # Validation: if either is -1, return empty array.
    if(start == -1 or end == -1):
        return day

    # loop through each hour block between start and end.
    for x in range(start, end):
        block = {'starttime':x, 'endtime':x +1}
        day.append(block)
    
    # When done, return the array of block objects.
    return day