It was narrated that Anas said:
"The Messenger of Allah set the time for postnatal bleeding at forty days, except for one who becomes pure before that." (JA)
English reference (JA): Vol. 1, Book 1, Hadith 649 (JA)
Arabic reference (JA): Book 1, Hadith 693 (JA)