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. Sahih Muslim 1080 i

Show Arabic text
Translation
Ibn Umar (Allah be pleased with both of them) reported Allah's Messenger (ﷺ) as saying

The month is thus and thus and thus (i. e. pointing with his fingers thrice), and he held back his thumb at the third time (in order to show that it can also consist of twenty-nine days).