كتاب الصيام
13  
The Book of Fasting
(2)
Chapter: The obligation to fast Ramadan when the crescent is sighted, and to break the fast when the crescent is sighted, and that if it is cloudy at the beginning or end of the month, then the month should be completed as thirty days.
(2)
بَاب وُجُوبِ صَوْمِ رَمَضَانَ لِرُؤْيَةِ الْهِلَالِ وَالْفِطْرِ لِرُؤْيَةِ الْهِلَالِ وَأَنَّهُ إِذَا غُمَّ فِي أَوَّلِهِ أَوْ آخِرِهِ أُكْمِلَتْ عِدَّةُ الشَّهْرِ ثَلَاثِينَ يَوْمًا
Sahih Muslim 1080 b

Ibn Umar reported that Allah's Messenger (ﷺ) made a mention of Ramadan and he with the gesture of his hand said:

The month is thus and thus. (He then withdrew his thumb at the third time). He then said: Fast when you see it, and break your fast when you see it, and if the weather is cloudy calculate it (the months of Sha'ban and Shawwal) as thirty days.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو أُسَامَةَ، حَدَّثَنَا عُبَيْدُ اللَّهِ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، رضى الله عنهما أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم ذَكَرَ رَمَضَانَ فَضَرَبَ بِيَدَيْهِ فَقَالَ ‏ "‏ الشَّهْرُ هَكَذَا وَهَكَذَا وَهَكَذَا - ثُمَّ عَقَدَ إِبْهَامَهُ فِي الثَّالِثَةِ - فَصُومُوا لِرُؤْيَتِهِ وَأَفْطِرُوا لِرُؤْيَتِهِ فَإِنْ أُغْمِيَ عَلَيْكُمْ فَاقْدِرُوا لَهُ ثَلاَثِينَ ‏"‏ ‏.‏
Reference : Sahih Muslim 1080b
In-book reference : Book 13, Hadith 5
USC-MSA web (English) reference : Book 6, Hadith 2364
  (deprecated numbering scheme)