The Prophet ﷺ swore that he would not enter upon some of his wives for a month. When twenty-nine days had passed, he went to them in the morning or in the evening. It was said to him, "Prophet of Allah ﷺ, you swore that you would not enter upon them for a month."He replied, "A month can be twenty-nine days."
أن النبي ﷺ حلف لا يدخل على بعض أهله شهرا، فلما مضى تسعة وعشرون يوما غدا عليهن أو راح، فقيل له: يا نبي الله ﷺ، حلفت أن لا تدخل عليهن شهرا؟ قال: إن الشهر يكون تسعة وعشرين يوما.
Bukhari narrated it in the Book of Marriage (5202), and Muslim in the Book of Fasting (1085), both through Ibn Jurayj, who said, "Yahya bin Abdullah bin Sayfi told me that Ikrima bin Abdul-Rahman bin Harith informed him, that Umm Salama informed him." Their two wordings are identical.