def translate_num_days_to_plot_title(num_days):
    """Translate a date range to a plot title.

    Args:
        num_days: An integer specifying how many days back to look.

    Returns:
        A string to be used for the pie plot title.
    """
    if num_days == 7:
        return "last week's jobs"

    # Get the number of weeks
    num_weeks = num_days / 7

    if num_weeks.is_integer():
        num_weeks_str = str(int(num_weeks))
    else:
        num_weeks_str = "{0:.1f}".format(num_weeks)

    return "last %s weeks' jobs" % num_weeks_str