Allah (swt) Tell’s us the story of the people of the cave….
(9. Do you think that the people of Al-Kahf and Ar-Raqim were a wonder among Our signs) (10. When the young men fled for refuge to Al-Kahf. They said: “Our Lord! Bestow on us mercy from Yourself, and facilitate for us our affair in the right way!”) (11. Therefore, We covered up their hearing in Al-Kahf for a number of years.) (12. Then We raised them up, that We might test which of the two parties was best at calculating the time period they tarried.)
(13. We narrate unto you their story with truth: Truly, they were young men who believed in their Lord (Allah), and We increased them in guidance.) (14. And We made their hearts firm and strong when they stood up and said: “Our Lord is the Lord of the heavens and the earth, never shall we call upon any god other than Him; if we did, we should indeed have uttered an enormity in disbelief.) (15. These our people have taken for worship gods other than Him. Why do they not bring for them a clear authority And who does more wrong than he who invents a lie against Allah.) (16. (The young men said to one another:) “And when you withdraw from them, and that which they worship, except Allah, then seek refuge in the cave; your Lord will open a way for you from His mercy and will make easy for you your affair.”)
(17. And you might have seen the sun, when it rose, declining to the right from their cave, and when it set, turning away from them to the left, while they lay in the midst of the cave. That is from the Ayat of Allah. He whom Allah guides, he is the rightly-guided; but he whom He sends astray, for him you will find no guardian to lead him.)
(18. And you would have thought them awake, whereas they were asleep. And We turned them on their right and on their left sides, and their dog stretching forth his two forelegs at the Wasid. Had you happened upon them, you would certainly have turned back from them in flight, and would certainly have been filled with awe of them.)
(19. Likewise, We woke them that they might question one another. A speaker among them said: “How long have you stayed (here)” They said: “We have stayed a day or part of a day.” They said: “Your Lord knows best how long you have stayed (here). So send one of you with this silver coin of yours to the town, and let him find out which is the Azka food, and bring some of that to you. And let him be careful and let no man know of you.”) (20. “For, if they come to know of you, they will stone you or turn you back to their religion; and in that case you will never be successful.”)
(21. And thus We made their case known, that they might know that the promise of Allah is true, and that there can be no doubt about the Hour. (Remember) when they (the people) disputed among themselves about their case, they said: “Construct a building over them; their Lord knows best about them,” (then) those who won their point said: “We verily, shall build a place of worship over them.”)
(22. They say they were three, the dog being the fourth among them; and they say they were five, the dog being the sixth, guessing at the unseen; and they say they were seven, and the dog being the eighth. Say: “My Lord knows best their number; none knows them but a few.” So debate not except with the clear proof. And consult not any of them (about the people of the Cave).)