def get_week_sec(epoch, epoch_start):
    """Returns seconds since the beginning of the week

    Parameters
    ----------
    epoch : datetime.datetime
    epoch_start : datetime.datetime

    Returns
    -------
    seconds : float

    """
    current_epoch = epoch - epoch_start
    week = current_epoch.days / 7.

    seconds = (week - int(week)) * (7 * 24 * 60 * 60)
    seconds += current_epoch.seconds

    return seconds