Language:
كتاب الأيمان والنذور
83  
Oaths and Vows
(20)
Chapter: Whoever took an oath that he would not enter upon his wife for one month
(20)
باب مَنْ حَلَفَ أَنْ لاَ يَدْخُلَ عَلَى أَهْلِهِ شَهْرًا، وَكَانَ الشَّهْرُ تِسْعًا وَعِشْرِينَ
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."

حَدَّثَنَا عَبْدُ الْعَزِيزِ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا سُلَيْمَانُ بْنُ بِلاَلٍ، عَنْ حُمَيْدٍ، عَنْ أَنَسٍ، قَالَ آلَى رَسُولُ اللَّهِ صلى الله عليه وسلم مِنْ نِسَائِهِ، وَكَانَتِ انْفَكَّتْ رِجْلُهُ، فَأَقَامَ فِي مَشْرُبَةٍ تِسْعًا وَعِشْرِينَ لَيْلَةً، ثُمَّ نَزَلَ فَقَالُوا يَا رَسُولَ اللَّهِ آلَيْتَ شَهْرًا‏.‏ فَقَالَ ‏{‏إِنَّ الشَّهْرَ يَكُونُ تِسْعًا وَعِشْرِينَ‏}‏
Reference : Sahih al-Bukhari 6684
In-book reference : Book 83, Hadith 61
USC-MSA web (English) reference : Vol. 8, Book 78, Hadith 675
  (deprecated numbering scheme)