Sunan an-Nasa'i, Book 22, Hadith 29 (Nasa'i 2123)

Narrated It was narrated that Abu Hurairah said:

: "The Messenger of Allah said: 'Fast when you see it and stop fasting when you see it, and if it is obscured from you (too cloudy), then count it as thirty (days).'"