Allah knows best.
Others have said that the change took place in Shaʿbān of that same year. Ibn Isḥāq states that it occurred after the expedition of ʿAbd Allah ibn Jahsh. Another report says that the qiblah was turned in Shaʿbān, eighteen months after the Messenger of Allah ﷺ had arrived in Madinah (1).
Ibn Jarīr (2) relates this opinion as well, transmitting through al-Suddī with his chain from Ibn ʿAbbās, Ibn Masʿūd, and a group of Companions. The great majority adopt this view, holding that the change came on the fifteenth of Shaʿbān, eighteen months after the Hijrah. He then cites (3) from Muḥammad ibn Saʿd, on the authority of al-Wāqidī, that it occurred on Tuesday, the fifteenth of Shaʿbān (4); but this precise dating remains open to scrutiny, and Allah knows best.
We have discussed the matter in detail in our Tafsīr (5) when commenting on the verse: “We have certainly seen your face turning toward the heaven; so We will surely turn you to a direction of prayer that will please you. Turn, therefore, your face toward the Sacred Mosque. And wherever you are, turn your faces toward it. Those who were given the Scripture know well that this is the truth from their Lord, and Allah is not unaware of what they do” (6) [al-Baqarah 2:144], together with the verses before and after it and the objections raised by the foolish among the Jews, the hypocrites, and the ignorant rabble (7). This was, after all, the first instance of abrogation in Islam. Earlier in the same sūrah, Allah had already laid down the principle of abrogation, saying (8): “Whatever verse We abrogate or cause to be forgotten, We bring forth one better than it or its like. Do you not know that Allah is All-Powerful over everything?” (9) [al-Baqarah 2:106].
Al-Bukhārī (10) records: Abū Nuʿaym narrated to us, having heard it from Zuhayr, from Abū Isḥāq, from al-Barāʾ, that the Prophet ﷺ prayed toward Bayt al-Maqdis for sixteen months—or seventeen—and he wanted his qiblah to be toward the House (the Kaʿbah). The first prayer he performed facing the Kaʿbah was the ʿAṣr prayer. Some people prayed with him, and one of them then left. Passing by a mosque whose congregation was in bowing, he called out: “By Allah, I have just prayed with the Prophet ﷺ facing Mecca.” They immediately turned round just as they were, facing the House. As for those who had died facing the former qiblah before the change—men who had been killed—we did not know what to say about them. Thereupon Allah revealed: