Messenger of Allah ﷺ took an oath for abstention from his wives (for one month), and during those days he had a sprain in his foot. He stayed in a Mashrubah (an upper room) for twenty-nine nights and then came down. Then the people said, "O Messenger of Allah ﷺ! You took an oath for abstention (from your wives) for one month." On that he said, "A (lunar) month can be of twenty-nine days."
آلَى رَسُولُ اللَّهِ ﷺ مِنْ نِسَائِهِ وَكَانَتِ انْفَكَّتْ رِجْلُهُ فَأَقَامَ فِي مَشْرُبَةٍ تِسْعًا وَعِشْرِينَ لَيْلَةً ثُمَّ نَزَلَ فَقَالُوا يَا رَسُولَ اللَّهِ آلَيْتَ شَهْرًا فَقَالَ {إِنَّ الشَّهْرَ يَكُونُ تِسْعًا وَعِشْرِينَ}