From Sahih Muslim (Hadith 2504):
Abdullah b. Umar (Allah be pleased with both of them) reported Allah's Measenger (ﷺ) as saying:When you see the new moon, observe fast, and when you see it (again) then break it, and if the sky is cloudy for you, then calculate it
Reference: Muslim 2504