It is narrated from Sayyiduna Abdullah bin Umar (may Allah be pleased with them both): If he divorces her while she is menstruating, she does not count that menstruation (in her waiting period). Yahya (may Allah have mercy on him) said: This is gharib (unusual); no one narrates it except Abd al-Wahhab al-Thaqafi. Imam al-Bayhaqi (may Allah have mercy on him) said: Yahya bin Ayyub al-Misri narrated its meaning from Ubaydullah, and it has been narrated to us from Sayyiduna Zayd bin Thabit (may Allah be pleased with him) that he said: When a man divorces his wife while she is in postnatal bleeding (nifas), the blood of nifas is not counted in her waiting period.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب العدد / 15402