Mishkat al-Masabih 559
وَعَن أم سَلمَة: إِنَّ امْرَأَةً كَانَتْ تُهْرَاقُ الدَّمَ عَلَى عَهْدِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَاسْتَفْتَتْ لَهَا أم سَلمَة رَسُول الله صلى الله عَلَيْهِ وَسلم فَقَالَ: «لِتَنْظُرْ عَدَدَ اللَّيَالِي وَالْأَيَّامِ الَّتِي كَانَتْ تَحِيضُهُنَّ مِنَ الشَّهْرِ قَبْلَ أَنْ يُصِيبَهَا الَّذِي أَصَابَهَا فَلْتَتْرُكِ الصَّلَاةَ قَدْرَ ذَلِكَ مِنَ الشَّهْرِ فَإِذَا خلفت ذَلِك فلتغتسل ثمَّ لتستثفر بِثَوْب ثمَّ لتصل» . رَوَاهُ مَالك وَأَبُو دَاوُد والدارمي وروى النَّسَائِيّ مَعْنَاهُ
From Umm Salamah: A woman used to bleed in the time of the Messenger of Allah ﷺ, and Umm Salamah asked the Messenger of Allah ﷺ for a ruling for her. He said: "Let her consider the number of nights and days in which she used to menstruate in the month before what befell her befell her, and let her leave the prayer for that much of the month. When she has passed that, let her bathe, then bind herself with a cloth, then pray." Reported by Malik, Abu Dawud and ad-Darimi, and an-Nasaʾi reported its meaning.