def infer_season_from_date(date):
    """
    Looks at a date and infers the season based on that: Year-1 if month is Aug or before; returns year otherwise.

    :param date: str, YYYY-MM-DD

    :return: int, the season. 2007-08 would be 2007.
    """
    season, month, day = [int(x) for x in date.split('-')]
    if month < 9:
        season -= 1
    return season