The Prophet ﷺ swore to keep away from his wives for a month and stayed in an upper chamber of his. He remained there for twenty-nine nights, then came down.Someone said, "Messenger of Allah, did you not swear to stay away for a month?"He replied, "A month can be twenty-nine days."
أخبرنا محمد بن المثنى قال حدثنا خالد قال حدثنا حميد
آلى النبي ﷺ من نسائه شهرا في مشربة له فمكث تسعا وعشرين ليلة ثم نزل فقيل يا رسول الله أليس آليت على شهر قال الشهر تسع وعشرون
Bukhari narrated it, hadith no. 378, 1911, 5201, 2469, 5289, 6684, from the hadith of Humayd Tawil at length through this same chain, and he explicitly stated hearing it directly in his version, and it is also in Kubra, hadith no. 5650. Khalid is Ibn Harith.