def get_season_from_game_id(game_id):
    """
    Gets season from nba.com game id
    4th and 5th digits of game id represent year season started
    ex 0021900001 is for the 2019-20 season

    :param str game_id: nba.com game id
    :return: season - Format YYYY-YY ex 2019-20
    :rtype: string
    """
    if game_id[4] == "9":
        return "20" + game_id[3] + game_id[4] + "-" + str(int(game_id[3]) + 1) + "0"
    else:
        return (
            "20" + game_id[3] + game_id[4] + "-" + game_id[3] + str(int(game_id[4]) + 1)
        )