Praise be to Allah.
Your vow to donate two months’ salary is a vow to do a good deed, which must be fulfilled, because the Prophet (blessings and peace of Allah be upon him) said: “Whoever vowed to obey Allah [by doing a righteous deed], let him obey Him, and whoever vowed to disobey Him, let him not disobey Him.” Narrated by al-Bukhari (6202).
For more information, please see the answer to question no. 2587 .
I put this question to our shaykh, ‘Abd ar-Rahman al-Barrak (may Allah preserve him) and he said:
If what the questioner meant when making this vow was that she would donate the next two months’ salary, then she must do that, and she cannot give it in smaller instalments.
But if she intended to give two months’ salary in general terms, without specifying any particular months, then she may give it in instalments of an appropriate amount that will benefit the needy person to whom she is giving it.
And Allah knows best.
Comment