Sahih al-Bukhari 6684
Narrated Anas:
Allah's Messenger (ﷺ) 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 Allah's Messenger (ﷺ)! 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."
حَدَّثَنَا عَبْدُ الْعَزِيزِ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا سُلَيْمَانُ بْنُ بِلاَلٍ، عَنْ حُمَيْدٍ، عَنْ أَنَسٍ، قَالَ آلَى رَسُولُ اللَّهِ صلى الله عليه وسلم مِنْ نِسَائِهِ، وَكَانَتِ انْفَكَّتْ رِجْلُهُ، فَأَقَامَ فِي مَشْرُبَةٍ تِسْعًا وَعِشْرِينَ لَيْلَةً، ثُمَّ نَزَلَ فَقَالُوا يَا رَسُولَ اللَّهِ آلَيْتَ شَهْرًا‏.‏ فَقَالَ ‏{‏إِنَّ الشَّهْرَ يَكُونُ تِسْعًا وَعِشْرِينَ‏}‏