We do know for the fact that the order of Zakaat did come in 2nd Hijri (Fasting was also made compulsory in this year). Logically speaking, It is impossible that the directives of Zakat came in 9th hijri, since there have been many ayahs on zakat in Quran. Had the order been in the last years then it wouldn't have been that frequent.
Don't confuse it with Hajj, which became obligatory in the 9th year of Hijra
|