عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((إِذَا رَأَيْتُمُ الْهِلَالَ فَصُومُوا، وَإِذَا رَأَيْتُمُوهُ فَأَفْطِرُوا، فَإِنْ غُمَّ عَلَيْكُمْ فَصُومُوا ثَلَاثِينَ يَوْمًا))
Narrated by Sayyiduna Abu Hurairah, may Allah be pleased with him: The Messenger of Allah, peace and blessings be upon him, said: Begin fasting upon sighting the moon and stop fasting upon sighting the moon, and if the moon is not visible, then complete thirty days of fasting.