The Messenger of Allah ﷺ vowed to keep apart from his wives for a month, and he stayed in an upper chamber for twenty-nine days.They said, "Messenger of Allah, you vowed for a month."He replied, "The month is twenty-nine days."
حدثنا علي بن حجر حدثنا إسمعيل بن جعفر عن حميد
آلى رسول الله ﷺ من نسائه شهرا فأقام في مشربة تسعا وعشرين يوما قالوا يا رسول الله إنك آليت شهرا فقال الشهر تسع وعشرون
Chapter Bukhari also narrated it in the book of fasting, chapter on the saying of the Prophet ﷺ, "When you see the new moon, then fast, and when you see it, then break your fast," hadith no. 1911, from the hadith of Humayd Tawil with the same wording.