The Messenger of Allah ﷺ said, "When you see the crescent moon, begin fasting, and when you see it again, break your fast. If it is obscured from you, then estimate its appearance."The narrator added that Ibn Umar used to fast one day before the crescent moon appeared.
حدثنا أبو مروان محمد بن عثمان العثماني حدثنا إبراهيم بن سعد عن الزهري عن سالم بن عبد الله
قال رسول الله ﷺ إذا رأيتم الهلال فصوموا وإذا رأيتموه فأفطروا فإن غم عليكم فاقدروا له قال وكان ابن عمر يصوم قبل الهلال بيوم
Bukhari narrated it in the Book of Fasting, chapter "Is it said Ramadan or the month of Ramadan? And whoever considers it all permissible," Hadith 1900, from the hadith of Ibn Shihab Zuhri, with only the marfu portion. Muslim also narrated it in the Book of Fasting, chapter "On the Obligation of Fasting Ramadan by Sighting the New Moon and Breaking the Fast," etc., Hadith 1081, from the hadith of Ibrahim bin Saad, from Zuhri, from Saeed bin Musayab, from Abu Hurairah, with the same wording.