Q: We know that fasting during the month of Ramadan is compulsory and it is one of the five pillars of Islam. I want to know in which year it was made compulsory and whether the Allah's command came before Haj/ Zakat became compulsory.

A: Assalamu Alaikum. Fasting was prescribed on the second Monday of the month of Sha'ban, in the second year of the Hijra. It was before the battle of Badr. Zakat and Zakat ul Fitr both became obligatory during the same year and also the change of Qiblia and the first Eid ul Fitr. Hajj became compulsory in the 9th year of Hijra. Five times obligatory prayer was prescribed after Isra and Miraj of Prophet (s.a.w) which was a year before Hijra on 27th of Rajab (as by most correct view) and first Azan was called in the first year of Hijra.