Islamic countries are still using, together with the gregorian calendar
a strictly lunar calendar; years are numbered starting with the Egira
(622 July 16: Mohammed leaves Mecca for Medina).
This perpetual calendar works for every date after the Egira.
The Koran states that new month should begin immediately after New Moon, or better at the first sighting
of the growing moon.
This exact moment is almost impossible to predict; for simplicity islamic perpetual calendar
use the following rule, which works rather good: the year has twelve month alternatively of 30 and 29 days;
the common year has then 354 days; since the lunar month is 44m longer than 29,5 days
a 30th day is added to the last month. This applies on 11 years out of 30 according to the sequence: 2,5,7,10,13,16,18,21,24,26,29. These years have so 355 years.
With such a rule 30 years have exactly 10631 days, while 360 moons make 10631.0125 days; there is still
a little mistake (1/80 of a day) but you need 2400 years to have a whole day error.
But keep in mind that the first day of the real month is based on direct observation of the first
growing moon, so the real calendare can differ from this perpetual calendar, usually no more than one day;
adn there can be such a 1-day difference even among islamic countries which are geographcally remote.