Abdullah bin Abbas reported,

I am amazed at those who fast before the month begins. The Messenger of Allah ﷺ said, "When you see the crescent, fast, and when you see it, break your fast. If it is obscured from you, complete the count as thirty."

Azami 4321

Sahih

عن ابن عباس، قال

عجبت ممن يتقدم الشهر! وقد قال رسول الله ﷺ: إذا رأيتم الهلال فصوموا، وإذا رأيتموه فأفطروا. فإن غم عليكم فأكملوا العدة ثلاثين.

الأعظمي 4321صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Obligation of fasting, its virtue, and its rulings
Section
Obligation of fasting upon sighting Hilal and breaking the fast upon sighting it, and if it is obscured then completing the month as thirty days
Numbering
Jami al-Kamil 4321 (2nd edition)
Azami 4321