Abu Sufyan (may Allah have mercy on him) said that one of our elders narrated to him that a man came to Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) and said: O Commander of the Believers! I was away from my wife for two years, and I have come back to find her pregnant. Sayyiduna Umar (may Allah be pleased with him) consulted the people about stoning her. Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him) said: O Commander of the Believers! If you have a case against her, you have no case against what is in her womb; leave her until she delivers. So he left her, and she gave birth to a boy whose two front teeth had already come out. The man recognised his own likeness in the child and said: By Allah, this is my son! Sayyiduna Umar (may Allah be pleased with him) said: Women are incapable of giving birth to the likes of Sayyiduna Mu'adh bin Jabal (may Allah be pleased with him); had it not been for Mu'adh, Umar would have been ruined. If this is established, it contains evidence that a pregnancy can remain in the womb for longer than two years. And the saying of Sayyiduna Umar (may Allah be pleased with him) about the woman whose husband goes missing, that she should wait four years, resembles something he may have said because a pregnancy can last four years. And Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العدد / 15558