Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:18:19

And similarly, We awakened them that they might question one another. Said a speaker from among them, "How long have you remained ˹here˺?" They said, "We have remained a day or part of a day." They said, "Your Lord is most knowing of how long you remained. So send one of you with this silver coin of yours to the city and let him look to which is the best of food and bring you provision from it and let him be cautious. And let no one be aware of you.  

And so, just as We did with them that which We have mentioned, it was that We aroused them, We awakened them, that they might question one another, concerning their state and the length of their stay ˹in the cave˺. One of them said, ‘How long have you tarried?’ They said, ‘We have tarried a day, or part of a day’: ˹he said this˺ because they had entered the cave at sunrise and were awakened at sunset, and so they thought that it was ˹the time of˺ sunset on the day of their entry. Then, they said, unsure about this ˹fact˺, ‘Your Lord knows best how long you have tarried. Now send one of you with this silver coin of yours (read bi-warqikum or bi-wariqikum) to the city — which is said to be the one now called Tarsus (Tarasūs) — and let him see which is the purest food, that is, which of the foods of the city is the purest, and ˹let him˺ bring you a supply thereof. Let him be careful and not make anyone aware of you.
القرآن:١٨:١٩

وَكَذَٰلِكَ بَعَثْنَاهُمْ لِيَتَسَاءَلُوا بَيْنَهُمْ ۚ قَالَ قَائِلٌ مِنْهُمْ كَمْ لَبِثْتُمْ ۖ قَالُوا لَبِثْنَا يَوْمًا أَوْ بَعْضَ يَوْمٍ ۚ قَالُوا رَبُّكُمْ أَعْلَمُ بِمَا لَبِثْتُمْ فَابْعَثُوا أَحَدَكُمْ بِوَرِقِكُمْ هَٰذِهِ إِلَى الْمَدِينَةِ فَلْيَنْظُرْ أَيُّهَا أَزْكَىٰ طَعَامًا فَلْيَأْتِكُمْ بِرِزْقٍ مِنْهُ وَلْيَتَلَطَّفْ وَلَا يُشْعِرَنَّ بِكُمْ أَحَدًا  

{وكذلك} كما فعلنا بهم ما ذكرنا {بعثناهم} أيقظناهم {ليتساءلوا بينهم} عن حالهم ومدة لبثهم {قال قائل منهم كم لبثتم قالوا لبثنا يوما أو بعض يوم} لأنهم دخلوا الكهف عند طلوع الشمس وبُعثوا عند غروبها فظنوا أنه غروب يوم الدخول ثم {قالوا} متوقفين في ذلك {ربكم أعلم بما لبثتم فابعثوا أحدكم بوَرقِكُمْ} بسكون الراء وكسرها بفضتكم {هذه إلى المدينة} يقال إنها المسماة الآن طرسوس بفتح الراء {فلينظر أيها أزكى طعاما} أي أيّ أطعمة المدينة أحل {فليأتكم برزق منه وليتلطف ولا يشعرن بكم أحداً}.