What is the earliest time ahead of a flight you can file an IFR flight plan?
5 days for IFR in Europe.
AFAIK there’s no formal limit for VFR, but chances are even higher that the plan is lost if it is distributed before the day of flight
In the US, filing thru Lockheed Martin supports up to 27 days prior to ETD. DUATS supports 24 hours in advance.