That is a very personal decision, there's no real set time.
Any amount of breast feeding
is better than none. However, since children
can start drinking whole milk, at a year of age, that's one time. Another is when the child can use a sippy, so they will never need a bottle. Some mom's nurse 2-3yrs, though. The benefits to mom, from breast feeding, are also found when nursing at least a year.