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 n
Translation
Ibn 'Umar (may Allah be pleased with both of them) reported Allah's Apostle as saying
We are an unlettered people who can neither write nor count. The month is thus, and thus. folding his thumb when he said it the third time.