عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((صُومُوا لِرُؤْيَتِهِ وَأَفْطِرُوا لِرُؤْيَتِهِ، فَإِنْ غُمَّ عَلَيْكُمُ الشَّهْرُ، فَأَكْمِلُوا الْعِدَّةَ ثَلَاثِينَ))
It is narrated from Sayyiduna Abu Hurairah, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: Begin fasting upon sighting the moon and stop fasting upon sighting the moon. However, if the moon is not visible due to clouds, then complete the count of thirty.