@fify-- I believe the threshold for that is 28 weeks (7 months). The lungs might still be developing but the baby can be kept in an incubator for several weeks after birth if that's the case. When the birth is at 25 weeks or before though, it starts to get dangerous. I had read somewhere that only half of the babies born at 24 weeks survive. So even one week can make a huge difference with the baby's development.
If the baby is born anytime after 28 weeks, it will be just fine.