كتاب الصيام
13  
The Book of Fasting
(4)
Chapter: The month may be twenty-nine days
(4)
باب الشَّهْرُ يَكُونُ تِسْعًا وَعِشْرِينَ ‏‏
Sahih Muslim 1085 a

Umm Salama (Allah be pleased with him) reported that the Messenger of Allah (ﷺ) took an oath that he would not go to some of his wives for the whole of the month. When twenty-nine days bad passed he (the Holy Prophet) went to them in the morning or in the evening. Upon this it was said to him:

Apostle of Allah, you took an oath that you would not come to us for a month, whereupon he said: The month may also consist of twenty-nine days.
حَدَّثَنِي هَارُونُ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا حَجَّاجُ بْنُ مُحَمَّدٍ، قَالَ قَالَ ابْنُ جُرَيْجٍ أَخْبَرَنِي يَحْيَى بْنُ عَبْدِ اللَّهِ بْنِ مُحَمَّدِ بْنِ صَيْفِيٍّ، أَنَّ عِكْرِمَةَ بْنَ عَبْدِ الرَّحْمَنِ بْنِ الْحَارِثِ، أَخْبَرَهُ أَنَّ أُمَّ سَلَمَةَ - رضى الله عنها - أَخْبَرَتْهُ أَنَّ النَّبِيَّ صلى الله عليه وسلم حَلَفَ أَنْ لاَ يَدْخُلَ عَلَى بَعْضِ أَهْلِهِ شَهْرًا فَلَمَّا مَضَى تِسْعَةٌ وَعِشْرُونَ يَوْمًا غَدَا عَلَيْهِمْ - أَوْ رَاحَ - فَقِيلَ لَهُ حَلَفْتَ يَا نَبِيَّ اللَّهِ أَنْ لاَ تَدْخُلَ عَلَيْنَا شَهْرًا ‏.‏ قَالَ ‏ "‏ إِنَّ الشَّهْرَ يَكُونُ تِسْعَةً وَعِشْرِينَ يَوْمًا ‏"‏ ‏.‏
Reference : Sahih Muslim 1085a
In-book reference : Book 13, Hadith 29
USC-MSA web (English) reference : Book 6, Hadith 2387
  (deprecated numbering scheme)