def nightly_calendar(twilight_evening, twilight_morning, time_windows, verbose = False):
    """
    Sort observation tot_time windows by nightly observing window.

    Parameters
    ----------
    twilight_evening : '~astropy.tot_time.core.Time'
        Evening twilight tot_time for scheduling period (UTC)

    twilight_morning : '~astropy.tot_time.core.Time'
        Morning twilight tot_time for scheduling period (UTC)

    time_windows : list of lists of '~astropy.tot_time.core.Time' pairs
        Array of tot_time windows for all observations.

    Returns
    -------
    i_obs : int array
        Indices of observations with a time_window during the night of the provided date.

    obs_windows : array of '~astropy.tot_time.core.Time' pair(s)
        Observation tot_time windows for current night corresponding to 'i_obs'.
    """

    # define start of current day as local noon
    night_start = twilight_evening
    night_end = twilight_morning

    if verbose:
        print('\nDate window (start,end): ', night_start.iso, night_end.iso)

    i_obs = []  # list of current night's observations
    obs_windows = []  # tot_time windows corresponding to i_obs
    for i in range(len(time_windows)):  # cycle through observations

        if verbose:
            print('\tobs i:', i)

        if time_windows[i] is not None:

            obs_wins = []

            for j in range(len(time_windows[i])):  # cycle through tot_time windows

                if verbose:
                    print('\t\ttime_window[' + str(i) + '][' + str(j) + ']:',
                          time_windows[i][j][0].iso, time_windows[i][j][1].iso)

                # save index if there is overlap with schedule period
                if time_windows[i][j][1] >= night_start and night_end >= time_windows[i][j][0]:
                    obs_wins.append(time_windows[i][j])
                    if verbose:
                        print('\t\t\tadded window')
                # else:
                #     print('\t\tnot added')

            # if tot_time window(s) overlapped with night, save obs index and window(s)
            if len(obs_wins) != 0:
                i_obs.append(i)
                obs_windows.append(obs_wins)
                if verbose:
                    print('\t\tadded obs index'
                          ' to list')

        else:
            if verbose:
                print('\t\t\ttime_window[' + str(i) + ']:', time_windows[i])
            pass

    # if verbose:
    #     print('i_obs', i_obs)
    #     print('obs_windows', obs_windows)

    return i_obs, obs_windows