He wrote a letter of divorce to his wife intending to send it at the end of the month
Question

                His wife insisted on divorce, and he told her “Think about it for one month.” But she did not change her mind, and she left. When the month was nearly over, he wrote a letter of divorce, intending to send it to her exactly at the end of the month. She got in touch with him one day before the
end of the month and said, “I want to come back.” So did the divorce take place?
Praise be to Allah.We put this question to Shaykh Muhammad ibn Saalih
    al-‘Uthaymeen, may Allaah preserve him, who replied as follows:
The matter is according to his intention; if he intended divorce, then
    the divorce has happened. But it seems that he did not want the divorce to happen until
    the end of the month, so on this basis the divorce did not happen.
And Allaah knows best.