The fondant seals up the cake, keeping it moist for several days. So how long your cake will keep under fondant really depends on the buttercream and/or filling, as vdrsolo said.
Generally speaking, buttercream recipes made with shortening and/or butter and powdered sugar will last at room temperature for several days. Buttercreams made with egg whites (meringue buttercreams)usually only last one day at room temp.
Fillings made with custards or cream generally need refrigeration until an hour before serving. Jams and preserves are a better choice if the cake needs to sit out longer.
These are just some general guidelines. It's taken me months of experimenting and research to figure out which combinations work best. You can search the forums here for tons more info on this topic.
Quote by @%username% on %date%
%body%