Generally, for a better deal it’s recommended to book in a timely manner (to save up to 42%). Cheapflights recommends you book around 60 days prior to your deserved date. Booking as early as you can also increases the likelihood that you’ll get the ideal car.
The length of time you can book a rental for is subject to the inventory of the supplier. When renting a vehicle from Joao Correa da Rocha Airport it should be possible to rent a car for a whole month if needed.