Zainab bint Abu Salamah (May Allah be pleased with them) said:
I went to Umm Habibah (May Allah be pleased with her) the wife of the Prophet (ﷺ), when her father Abu Sufyan bin Harb (May Allah be pleased with him) died. Umm Habibah (May Allah be pleased with her) sent for a yellow coloured perfume or something else like it, and she applied it to a slave-girl and then rubbed it on her own cheeks and said: "By Allah, I have no need for perfume, I heard the Messenger of Allah (ﷺ) saying from the pulpit, 'It is not permissible for a woman who believes in Allah and the Last Day to mourn for the dead beyond three days, except for the death of her husband; in which case the period of mourning is of four months and ten days."' Zainab said: I then visited Zainab, daughter of Jahsh (May Allah be pleased with her) when her brother died; she sent for perfume and applied it and then said: "Beware! By Allah, I don't feel any need of perfume but I heard the Messenger of Allah (ﷺ) saying from the pulpit, 'It is not permissible for a woman who believes in Allah and the Last Day to mourn the dead beyond three days except in case of her husband (for whom the period is) four months and ten days."'[Al-Bukhari and Muslim]
App reference: Book 18, Hadith 264
Arabic/English book reference: Book 18, Hadith 1774