If a breastfed child over the age of two does not nurse over the course of three days because he does not want to (not because he is sick or the mother is absent), breastfeeding may not be
resumed. Under the age of two, breastfeeding may be resumed even if there is a significant gap.
A woman may nurse until her child is four, as long as both she and the child wish to continue, even if it prevents her from conceiving. We are unaware of any sources that discuss reasons to stop or continue nursing past 24 months.
A woman is required to stop breastfeeding when her child reaches the age of four. However, if the child still seems to need to nurse, it is permissible to continue until age five.
Additionally, a woman is halachically considered a
meineket for two years postpartum (see Shulchan Aruch Yoreh Deah, end of siman 189), even if she does not actually breastfeed for that long. This halachic status may reflect a hashkafic approach that breastfeeding is desirable for a period of at least two years.
Weaning is a personal decision, taking into account both the mother's and the child's needs. Breastfeeding is medically recommended for at least the first twelve months (supplemented with solids starting at about six months), and for longer as long as both mother and child wish to continue.
If you are having difficulty with breastfeeding, do not hesitate to ask for help. A woman should not feel that she is compelled to breastfeed if it causes her physical or emotional difficulties.
These halachot are found in the Talmud Bavli, Niddah 9a, and Shulchan Aruch Yoreh Deah 81:7. A full article on this topic by Dr Deena Zimmerman can be found in
Jewish Legal Writings by Women, published by Urim.