The Prophet ﷺ gave a sermon during his hajj and said: Time has completed a cycle and assumed the form of the day when Allah created the heavens and the earth. The year contains twelve months of which four are sacred, three of them consecutive, viz. Dhul-Qa'dah, Dhul-Hijjah and Muharram and also Rajab of Mudar which comes between Jumadah and Sha'ban. (Using translation from Abū Dāʾūd 1947)
أَنَّ النَّبِيَّ ﷺ خَطَبَ فِي حَجَّتِهِ فَقَالَ «أَلَا إِنَّ الزَّمَانَ قَدِ اسْتَدَارَ كَهَيْئَتِهِ يَوْمَ خَلَقَ اللهُ السَّمَوَاتِ وَالْأَرْضَ السَّنَةُ اثْنَا عَشَرَ شَهْرًا مِنْهَا أَرْبَعَةٌ حُرُمٌ ثَلَاثَةٌ مُتَوَالِيَاتٌ ذُو الْقَعْدَةِ وَذُو الْحِجَّةِ وَالْمُحَرَّمُ وَرَجَبُ الَّذِي بَيْنَ جُمَادَى وَشَعْبَانَ»