The Pilgrimage - 22:5 O mankind, if you doubt about the resurrection, (remember) We created you from dust, then from a drop, then from a suspended matter (embryo), then from an offspring whose form is definite and uncertain. Thus do We inform you. And whatever We will, We keep it in the wombs for a certain term. Then We bring you forth as a baby, and then you grow to maturity. Some of you will be terminated, and some of you will be brought to the worst age. So that he may not know anything after he has knowledge. You see the earth dry and dead, but when We rain water on it, it vibrates and swells and produces beautiful plants.
Certain length of stay in the womb:
The Sandhills/46:15 "We admonished man to do good to his parents, and his mother carries him laboriously and gives birth to him laboriously. It takes thirty months from the time he is carried in his mother´s womb to his weaning. Finally, when he reaches the age of maturity and is forty years old, he says: "My Lord, direct me to be grateful for the favor You have bestowed on me and my parents and to do good deeds with which You are pleased. Correct my progeny. I am of those who repent and submit to You."

The Cow/2:233 For those who wish to complete the period of breastfeeding, mothers should breastfeed their babies for two years. The mother´s need for food and clothing should be met by the father of the child in a good and proper manner. No one should be held responsible beyond his capacity. The mother should not be harmed because of her child, nor should the father be harmed because of his child. It is also the duty of the heir to realize this. If the parents want to wean after consultation and agreement, there is no sin on either of them. If you wish to have your children suckled by a wet nurse, you are not liable as long as you pay her properly. Listen to Allah, Allah is All-Seeing of what you do.

Luqman/31:14 We admonished man about his parents, and his mother carries him with great difficulty. His weaning takes place in two years. You should thank Me and your parents. To Me is the return.