We have weaned as early as 3 months, due to the mare's condition, however 4 months and possibly longer, depending on the condition of either, or both, the mare and foal.
Making it sound complicated, but suffice is to say, I make a decision based on many factors. It isn't just age, it's condition of mare, condition of foal, behaviour and temperment.
I weaned a filly around 4 months last year, and she looked great, was eating hay and krunch and sweet feed.
In a short time she was acting funny (sort of colicy) and had to put her back with her mum and treat her for ulcers.
It may have been about 7 months before she was able to go with the other weanlings and not have a bad tummy.
I always wean with a buddy too, so sometimes one foal will have a month longer than my "norm" due to the wait.