Anas said that God’s Messenger swore he would stay away from his wives for a month. His foot being dislocated, he stayed in an upper room for twenty-nine nights and then came down; and when it was remarked to him that he has sworn to stay away for a month, he replied, “The month has twenty-nine days.”*
*This is most probably with reference to the month in question, as it cannot be considered a general statement.
Bukhari transmitted it.