[Machine] A woman was menstruating during the time of the Prophet Muhammad ﷺ and she sought advice from Umm Salamah, the Prophet's wife, regarding this. Umm Salamah advised her to calculate the number of nights and days in which she used to menstruate and then abstain from praying during that duration. Once her menstruation ends, she should take a bath (ghusl), wear a clean cloth (thawb), and then perform the prayer.
أَنَّ امْرَأَةً كَانَتْ تُهْرَاقُ الدِّمَاءَ عَلَى عَهْدِ رَسُولِ اللهِ ﷺ فَاسْتَفْتَتْ لَهَا أُمُّ سَلَمَةَ النَّبِيَّ ﷺ عَنْ ذَلِكَ فَقَالَ «لِتَنْظُرْ عِدَّةَ اللَّيَالِيَ وَالْأَيَّامِ الَّتِي كَانَتْ تَحِيضُهُنَّ وَقَدْرَهُنَّ فَلْتَتْرُكِ الصَّلَاةَ فَإِذَا حَلَفَتْ ذَلِكَ فَلْتَغْتَسِلْ وَلْتَسْتَثْفِرْ بِثَوْبٍ وَلْتُصَلِّ»