The Prophet (peace be upon him) has taught us that voluntary fasting is one of the best types of worship by which we increase our reward from God and ensure forgiveness of our sins. A rule mentioned in the Qur’an states: “Good deeds erase evil ones.” (11: 114) This means that when we commit a sin or do a bad deed, we need to offset it by a good one, such as a charitable donation, voluntary prayer or fasting, performing the Umrah or the pilgrimage, etc. Voluntary fasting can be done on any day of the year, except the first day of the Eid that follows Ramadan and the four days of the Eid of sacrifice. It is also discouraged to single out Friday for voluntary fasting. If one wants to fast voluntarily on a Friday, he should also fast either on Thursday or Saturday of the same week. The Prophet often fasted on Mondays and Thursdays. He also encouraged fasting on the three middle days of every lunar month, calling them the white days because the moon is full on their nights. He also recommended us to fast six days of our choice after the month of Ramadan. People think that these should be in Shawwal, the month that follows Ramadan, but this is not necessary. They can be at any time in the year.
The Prophet also recommended fasting on certain days, such as 9 Dhul Hijjah, the day when the pilgrims are in attendance at Arafat. It is strongly recommended for people who are not offering the pilgrimage to fast on that day. Another day which is strongly recommended to fast is 10th of Muharram, but it is not recommended to fast on 27 Rajab or 15 Shaaban or the first day of the lunar year.
People are often confused about the reason for fasting on 10th of Muharram. The real reason is clearly stated in the following Hadith reported by Abdullah ibn Abbas: “When the Prophet arrived in Madinah, he noticed that the Jews in Madinah fasted on 10th of Muharram. He asked them why. They said: ‘This is a good day; a day on which God saved the Children of Israel from their enemies, and therefore Moses used to fast on that day.’ The Prophet said: ‘I have a stronger claim to Moses than you.’ He began fasting on that day and ordered his followers to fast as well.” (Related by Al-Bukhari).
The Prophet arrived in Madinah in the month of Rabie I, which means that he noticed the action of the Jews ten months after his arrival. He did not fast that year, because he only noticed the Jewish fast when it was done. When he ordered fasting on that day, it was obligatory, and the Muslims fasted on it the following year. However, shortly afterwards, fasting during the month of Ramadan became obligatory. The Prophet rescinded the order to fast on 10th of Muharram, which meant that the obligation to fast on that day has been canceled, but its fast remained recommended.
The Prophet’s reason for recommending this is to demonstrate to all Muslim generations, and to all people, the unity of God’s message. The message given to Moses, and indeed to all prophets and messenger is the same in essence. It is based on the belief in God’s oneness and in the Day of Judgment. Prophet Moses struggled hard against disbelief and worked tirelessly to establish the divine faith. Therefore, the day when God saved him and his followers from Pharaoh is to be celebrated by Muslims every year.

