When is the best time to get the flu shot for maximum protection?

When is the best time to get the flu shot for maximum protection?