All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Fasting the month of Ramdhaan was prescribed in Sha‘baan of the second year after Hijrah. The Prophet, sallallaahu ‘alayhi wa sallam, died in Rabee' Al-Awwal of the eleventh year after Hijrah. This means that the Prophet, sallallaahu ‘alayhi wa sallam, fasted Ramadan nine years.
Allaah Knows best.