Lunar months may last 29 or 30 days. The beginnings and endings of these months are determined by observation. After the 29th sunset of the current month, the crescent of the next month is observed. Since this new moon (crescent) sets a while after the sunset, it requires careful observation. If the western horizon is somehow blocked by dust, smog or cloud, observation may be hard or even impossible. If the crescent cannot be observed, current month is counted as 30. Then, there would be no need to observe the crescent the next day. The second month would be due, that day by sunset. Because no lunar month lasts longer than 30 days.
The Messenger of Allah (p.b.u.h.)decrees:
“When you see the crescent of the month of Ramadan, start fasting, and when you see the crescent of the month of Shawwal, stop fasting; and if the sky is overcast and you can’t see the crescent, then regard the month of Ramadan as of 30 days.” (Bukhari, Sawm, 11)
Another hadith is as follows:
“We are an illiterate nation. We do not use writing or computation [in our fasting]. A month is so and so and so (and he pointed with his hands three times, folding the thumb on the third time, meaning twenty nine days) or so and so and so (and he pointed with his hands three times, meaning thirty days).” (Bukhari, Sawm, 11, 13; Muslim, Siyam, 4, 10, 12, 13, 15; Abu Dawood, Sawm, 4; Ibn Majah, Sawm, 8; Nesai, Sawm 17; Ahmad b. Hanbal, 1/184; 2/ 43, 52, 122, 129.)