It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that he heard Abul Qasim (peace and blessings be upon him) saying: "Fast upon sighting the moon, and celebrate Eid upon sighting the moon. If the moon is not visible and the sky is cloudy, then complete the count to thirty."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 9853