Sahih Muslim , Book 13, Hadith 22 (In-Book) ⓘ
Abu Huraira reported Allah's Messenger as saying: Observe fast on sighting it (the new moon) and break it on sighting it. But if (due to clouds) the actual position of the month is concealed from you, you should then count thirty (days).
وَحَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، عَنْ مُحَمَّدِ بْنِ زِيَادٍ، قَالَ سَمِعْتُ أَبَا هُرَيْرَةَ، - رضى الله عنه - يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " صُومُوا لِرُؤْيَتِهِ وَأَفْطِرُوا لِرُؤْيَتِهِ فَإِنْ غُمِّيَ عَلَيْكُمُ الشَّهْرُ فَعُدُّوا ثَلاَثِينَ " .
also referenced under: Hadith 1081 (Reference) & Book 6, Hadith 2380 (USC-MSA)