Ibn ‘Umar (may Allah be pleased with him) said: "When the period of four months has passed, the husband should be put in prison so that he divorces his wife, but the divorce does not occur unless the husband himself declares it."
عن ابن عمر قال: "إذا مَضَتْ أربعة أشهر: يُوقَفُ حتى يُطَلِّقَ، ولا يَقَعُ عليه الطلاق حتى يُطَلِّقَ".
شرح الحديث :
In this Hadīth Ibn ‘Umar (may Allah be pleased with him) shows that the maximum lawful period for taking an oath not to have sexual intercourse with the wife is four months. Exceeding this time limit is impermissible, and the husband must either break his oath and return to normal or divorce his wife. Yet, the elapsing of the four months does not by itself constitute a divorce or annulment of marriage. Instead, divorce occurs only when the husband himself issues it, even if he was forced by the judge, because in such a case he is forced to divorce his wife based on a rightful cause.