Breastfeeding and pregnant

How long can I breastfeed my toddler while being pregnant?