It was narrated that Rib’i said: “The Messenger of Allah صلی اللہ علیہ وآلہ وسلم said: ‘When you see the crescent then fast, and when you see it, then stop fasting. If it is too cloudy then complete Sha’ban as thirty days, unless you see the crescent before that, then fast Ramadan as thirty days, unless you see the new crescent before that.” (Sahih)