Sunan an-Nasa'i, Book 27, Hadith 68 (Nasa'i 3462)

It was narrated that Anas said:

"The Prophet swore an oath of abstention from his wives for a month and stayed in his room for twenty-nine days. It was said: 'O Messenger of Allah, did you not swear an oath of abstention for a month?' He said: 'This month is twenty-nine days.'"