Sahih al-Bukhari Book 68, Hadith 39
Ibn `Umar used to say about the Ila (which Allah defined (in the Holy Book), "If the period of Ila
expires, then the husband has either to retain his wife in a handsome manner or to divorce her as Allah
has ordered."
Allah's Messenger (ﷺ) took an oath that he would abstain from his wives, and at that time his leg had been sprained (dislocated). So he stayed in the Mashruba (an attic room) of his for 29 days. Then he came down, and they (the people) said, "O Allah's Messenger (ﷺ)! You took an oath to abstain from your wives for one month." He said, "The month is of twenty nine days."
"When the period of four months has expired, the husband should be put in prison so that he should divorce his wife, but the divorce does not occur unless the husband himself declares it. This has been mentioned by `Uthman, `Ali, Abu Ad-Darda, `Aisha and twelve other companions of the Prophet (ﷺ) ."