def get_deadline_delta(target_horizon):
    """Returns number of days between official contest submission deadline date
    and start date of target period
    (0 for weeks 1-2 target, as it's 0 days away,
    14 for weeks 3-4 target, as it's 14 days away,
    28 for weeks 5-6 target, as it's 28 days away)

    Args:
       target_horizon: "12w", "34w", or "56w" indicating whether target period is
          weeks 1 & 2, weeks 3 & 4, or weeks 5 & 6
    """
    if target_horizon == "12w":
        deadline_delta = 0
    elif target_horizon == "34w":
        deadline_delta = 14
    elif target_horizon == "56w":
        deadline_delta = 28
    else:
        raise ValueError("Unrecognized target_horizon "+target_horizon)
    return deadline_delta