The Islamic calendar is based on visibility of the crescent Moon. However, this is a very difficult scientific problem. We know perfectly well where the Moon and the Sun are at any given time, but how light must the Moon be and how dark must the sky be before we can see the crescent? And what if the weather is bad?
In the sixties, the actual date for Hari Raya is only announced the day before during the sunset..The MUIS (Majlis Ugama Islam Singapura) officials would gather at the Sultan Shoal lighhouse which situated at the southermost part of Singapore to sight the crescent moon.That got the villagers to scramble around for last minute preparations..
In 1974, MUIS then decided that the new month starts if at sunset on the eve of the 29th day the Moon is above the horizon. (The Muslim calendar in Singapore is based on latitude 1 20' 34'' N and longitude 103 51' 08'' E.) In the 80s, they decided to follow a variation of the 1978 Istanbul criteria and require that the altitude of the Moon should be more than 5 degrees at sunset.