(11) بَابُ قَوْلِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا رَأَيْتُمُ الْهِلاَلَ فَصُومُوا وَإِذَا رَأَيْتُمُوهُ فَأَفْطِرُوا»
Narrated `Abdullah bin `Umar:
Allah's Messenger (ﷺ) mentioned Ramadan and said, "Do not fast unless you see the crescent (of Ramadan), and do not give up fasting till you see the crescent (of Shawwal), but if the sky is overcast (if you cannot see it), then act on estimation (i.e. count Sha'ban as 30 days).
Reference: Sahih al-Bukhari 1906
In-book reference: Book 30, Hadith 16
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 31, Hadith 130