Sayyiduna Abu Hurairah (may Allah be pleased with him) reports: The Messenger of Allah (peace and blessings be upon him) said: "Fast upon sighting the moon and celebrate Eid al-Fitr upon sighting the moon. If clouds obscure (the sky) for you, then complete the count to thirty."
Related hadith on this topic