(2) بَاب وُجُوبِ صَوْمِ رَمَضَانَ لِرُؤْيَةِ الْهِلَالِ وَالْفِطْرِ لِرُؤْيَةِ الْهِلَالِ وَأَنَّهُ إِذَا غُمَّ فِي أَوَّلِهِ أَوْ آخِرِهِ أُكْمِلَتْ عِدَّةُ الشَّهْرِ ثَلَاثِينَ يَوْمًا
Abu Huraira reported Allah's Messenger (ﷺ) as saying:
Observe fast on sighting it (the new moon) and break (fast) on sighting it (the new moon), but if the sky is cloudy for you, then complete the number (of thirty).
Reference: Sahih Muslim 1081 b
In-book reference: Book 13, Hadith 21
USC-MSA web (English) reference(deprecated numbering scheme): Book 6, Hadith 2379