The American Academy of Pediatrics recommends breastfeeding exclusively up until 6 months, at which point we introduce complementary or solid foods to babies, and then up to a year or mutually agreeable. There's nothing wrong with going over a year. Many moms go to 2 years. Many moms go beyond. The worldwide average, believe it or not, is actually 4 1/2 years old. In most cases in the United States especially, mothers have babies within 2 to 3 years apart. A lot of moms decide to tandem nurse, which is nurse both at the same time.
A lot of times, you will find that if you want to breastfeed while you're pregnant, it's absolutely fine. No one should tell you you're going to miscarry. It's not true. It's a little bit of a wives' tale. But a lot of times, with the older baby, once your body, if you are pregnant, starts to produce colostrum again around the 5th month or so, many many older babies or children, will start to reject the breastfeeding because the taste changes again. So, you're body's gearing up for baby number 2, or whichever baby this is. It might be baby number 3.
So a lot of times, the older child might wean himself or herself. If not, and you choose to breastfeed both babies at the same time, there's plenty to go around. You do not have to worry that you're going to run out of milk for one or the other. Many many mothers choose to do this. There's really no set time that you have to wean your child. You and your child will find a mutually agreeable time to wean. What I mean by mutually agreeable is, it's not necessarily you choosing a date, which many mothers do, and that's absolutely fine, but also the child saying "I'm ready for this". When you choose to wean, it really has to be the best for both of you.