عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ((لَا تَقَدَّمُوا الشَّهْرَ بِيَوْمٍ وَلَا يَوْمَيْنِ، إِلَّا أَنْ يُوَافِقَ أَحَدُكُمْ صَوْمًا كَانَ يَصُومُهُ، صُومُوا لِرُؤْيَتِهِ وَأَفْطِرُوا لِرُؤْيَتِهِ، فَإِنْ غُمَّ عَلَيْكُمْ فَأَتِمُّوا ثَلَاثِينَ يَوْمًا، ثُمَّ أَفْطِرُوا))
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: Do not fast one or two days before the month of Ramadan, except if there is a day on which one of you habitually fasts, then he may fast on that day. Begin fasting upon sighting the moon and stop fasting upon sighting the moon. If the sky is cloudy, then complete thirty days before stopping the fast.