The Messenger of Allah ﷺ said, "It is not lawful for a woman who believes in Allah and the Last Day to mourn for any deceased person beyond three nights, except for a husband."
أن رسول الله ﷺ قال: لا يحل لامرأة تؤمن بالله واليوم الآخر أن تحد على ميت فوق ثلاث ليال إلا على زوج.
Malik narrated it in the chapter on divorce (104), from Nafi, from Safiya bint Abu Ubayd, from Ayesha and Hafsa, and they both mentioned it.Muslim narrated it in the chapter on divorce (1490) through Layth bin Saad, from Nafi, with the same wording, similarly.He added, in the narration of Yahya bin Saeed from Nafi, from the hadith of Hafsa alone, "For she observes mourning for him for four months and ten days."