عالم الغيب فلا يظهر على غيبه احدا ٢٦
عَـٰلِمُ ٱلْغَيْبِ فَلَا يُظْهِرُ عَلَىٰ غَيْبِهِۦٓ أَحَدًا ٢٦
عٰلِمُ
الْغَیْبِ
فَلَا
یُظْهِرُ
عَلٰی
غَیْبِهٖۤ
اَحَدًا
۟ۙ

Verse [ 26] is the proof of the preceding verse. The Holy Prophet ﷺ does not know whether the promised day is close or whether a longer time is appointed for it, because Allah alone is the knower of the Unseen. That is His exclusive characteristics, and therefore He does not divulge His Unseen to anyone. The definite article alif lam in al-ghaib 'the Unseen' is grammatically referred to as alif lam for istighraq lil jins 'the article encompassing and indicating the entire genus' [ as stated in Ruh with reference to Radi, that is, He is Omniscient - knowing every species of the Unseen and all genera of the Unseen. In the idafah [ possessive case ] construction ghaibihi 'His Unseen', the possessive pronoun refers to 'Allah' and reinforces His predominance over the Unseen. Allah's knowledge comprehends and encompasses every infima species [ species of species ] and every summum genus [ genus of genera ] of His creation. This is a specialized attribute of Allah. He does not divulge His Unseen to anyone indiscriminately, so that he may store and retrieve the secrets of the unknown world as and when he wishes.

The purport of the verse under comment is to affirm the totality of Allah's knowledge of the Unseen so that He alone is fully aware of every particle of His creation, and to negate such total knowledge of the Unseen for anyone other than Allah. It was possible that an unintelligent person might surmise that the Holy Prophet ﷺ did not have any knowledge of the Unseen - so, how can he be a Messenger? Allah reveals to a Messenger thousands of secrets of the Unseen. Anyone to whom no revelation comes down cannot be a Prophet or a Messenger. Thus the following verse makes an exception:

إِلَّا مَنِ ارْ‌تَضَىٰ مِن رَّ‌سُولٍ فَإِنَّهُ يَسْلُكُ مِن بَيْنِ يَدَيْهِ وَمِنْ خَلْفِهِ رَ‌صَدًا ﴿27﴾

(...except a messenger whom He chooses [ to inform through revelation ], and then He appoints [ angels as ] watching guards before him and behind him, [ so that devils may not tamper with the divine revelation,].... 72:27)