def plan_window(plan, ending_after, starting_before):
    """
    Return list of items in the given window.
    """

    window_tasks = []

    for task in plan:
        if ending_after < task['end'] and task['start'] < starting_before:
            window_tasks.append(task)

    return window_tasks