At-Talaaq - 65:4

وَاللَّائِي يَئِسْنَ مِنَ الْمَحِيضِ مِن نِّسَائِكُمْ إِنِ ارْتَبْتُمْ فَعِدَّتُهُنَّ ثَلَاثَةُ أَشْهُرٍ وَاللَّائِي لَمْ يَحِضْنَ وَأُوْلَاتُ الْأَحْمَالِ أَجَلُهُنَّ أَن يَضَعْنَ حَمْلَهُنَّ وَمَن يَتَّقِ اللَّهَ يَجْعَل لَّهُ مِنْ أَمْرِهِ يُسْرًا
[65:4]
And (as for) those of your women who have despaired of menstruation, if you have a doubt, their prescribed time shall be three months, and of those too who have not had their courses; and (as for) the pregnant women, their prescribed time is that they lay down their burden; and whoever is careful of (his duty to) Allah He will make easy for him his affair.
Such of your women as have passed the age of monthly courses, for them the prescribed period, if ye have any doubts, is three months, and for those who have no courses (it is the same): for those who carry (life within their wombs), their period is until they deliver their burdens: and for those who fear Allah, He will make their path easy.
And for such of your women as despair of menstruation, if ye doubt, their period (of waiting) shall be three months, along with those who have it not. And for those with child, their period shall be till they bring forth their burden. And whosoever keepeth his duty to Allah, He maketh his course easy for him.