Sahih Bukhari Volume 003, Book 031, Hadith Number 135.

Narated By Anas : Allah's Apostle vowed to keep aloof from his wives for one month, and he had dislocation of his leg. So, he stayed in a Mashruba for 29 nights and then came down. Some people said, "O Allah's Apostle! You vowed to stay aloof for one month," He replied, "The month is of 29 days."