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 l

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, and he flapped his hands with all their fingers twice. but at the third turn, folded his right thumb or left thumb (in order to give an idea of twenty-nine).