The Islamic calendar or Muslim calendar is the calendar used to date events in predominately Muslim countries, and used by Muslims everywhere to determine the proper day on which to celebrate Muslim holy days. It is a purely lunar calendar having 12 lunar months in a year of about 354 days. Because this lunar year is about 11 days shorter than the solar year, Muslim holy days, although celebrated on fixed dates in their own calendar, usually occur 11 days earlier each successive solar year, such as a year of the Gregorian calendar. Islamic years are also called Hijra years because the first year was the year during which the Hijra occurred—Muhammad's emigration from Mecca to Medina. Thus each numbered year is designated either H or AH, the latter being the initials of the Latin anno Hegirae (in the year of the Hijra).
The predecessor to the Islamic calendar was a lunisolar calendar in that it used lunar months but was also kept synchronized with the seasons by the insertion of an additional, intercalary, month when required. Whether the intercalary month (Nasi) was added in the spring like that of the Hebrew calendar or in autumn is debatable. It is assumed that the intercalary month was added between the twelfth month (the month of the pre-Islamic Hajj) and the first month (Muharram) of this pre-Islamic year. The two Rabi' months denote grazing and the modern Meccan rainy season (only slightly less arid than normal), which would promote the growth of grasses for grazing, occurs during autumn. These imply a pre-Islamic year beginning near the autumnal equinox. But the rainy season after which these months are named may have been different when the names originated (before Muhammad's time) or the calendar may have been imported from another region which did have such a rainy season. On the other hand, Muhammad forbade the intercalary month (released the calendar from the seasons) near the end of his life, which implies a pre-Islamic year beginning near the vernal equinox because that is when the modern lunar year began during his last year.
Numbering the years
Abraha, a governor of Yemen, then a province of the Christian nation of Abyssinia (modern Ethiopia), attempted to destroy the Kaaba with an army which included an elephant (possibly several). Although the raid was unsuccessful, the elephant so impressed the Meccans that that year became known as the Year of the Elephant, which was also the year that Muhammad was born. Although most Muslims equate it with the Western year 570 CE, a minority equate it with 571 CE. Later years were numbered from the Year of the Elephant, whether for the years of the pre-Islamic lunisolar calendar, the lunisolar calendar used by Muhammad before he forbade the intercalary month, or the first few years of the lunar calendar thus created. In 638 CE (AH 17), the second Caliph Umar ibn al-Khattab began numbering the years of the Islamic calendar from the year of the Hijra, which was postdated AH 1. The first day of the first month (1 Muharram) of that proleptic Islamic year, that is, after the removal of all intercalary months between the Hijra and Muhammad's prohibition of them nine years later, corresponded to July 16, 622 CE (the actual emigration took place in September).
Each month has either 29 or 30 days, but usually in no discernible order. Traditionally, the first day of each month was the day (beginning at sunset) of the first sighting of the lunar crescent (the hilal) shortly after sunset. If the hilal was not observed immediately after the 29th day of a month, either because clouds blocked its view or because the western sky was still too bright when the moon set, then the day that began at that sunset was the 30th. Such a sighting had to be made by one or more trustworthy men testifying before a committee of Muslim leaders. Determining the most likely day that the hilal could be observed was a motivation for Muslim interest in astronomy, which put Islam in the forefront of that science for many centuries. This traditional practice is still followed in a few parts of the world, like Pakistan and Jordan. However, in most Muslim countries astronomical rules are followed which allow the calendar to be determined in advance, which is not the case using the traditional method. Malaysia, Indonesia, and a few others begin each month at sunset on the first day that the moon sets after the sun (moonset after sunset). In Egypt, the month begins at sunset on the first day that the moon sets at least five minutes after the sun.
The official Umm al-Qura calendar of Saudi Arabia used a substantially different astronomical method until recent years  (http://www.jas.org.jo/sau.html). Before AH 1420 (before April 18, 1999), if the moon's age at sunset in Riyad was at least 12 hours, then the day ending at that sunset was the first day of the month. This often caused the Saudis to celebrate holy days one or even two days before other Muslim countries, including the dates for the Hajj, which can only be dated using Saudi dates because it is performed in Mecca. During one memorable year during the AH 1380s (the 1970s), different Muslim countries ended the fast of Ramadan on each of four successive days! The celebrations became more uniform beginning in AH 1420. For AH 1420-22, if moonset occurred after sunset at Mecca, then the day beginning at that sunset was the first day of a Saudi month, essentially the same rule used by Malaysia, Indonesia, and others (except for the location from which the hilal was observed). Since the beginning of AH 1423 (March 16, 2002), the rule has been clarified a little by requiring the geocentric conjunction of the sun and moon to occur before sunset, in addition to requiring moonset to occur after sunset at Mecca. This ensures that the moon has moved past the sun by sunset, even though the sky may still be too bright immediately before moonset to actually see the crescent.
The moon sets progressively later than the sun for locations further west, thus western Muslim countries are more likely to celebrate some holy day one day earlier than an eastern Muslim country.
Microsoft uses the "Kuwaiti algorithm" to convert Gregorian dates to the Islamic ones. It is based on statistical analysis of historical data from Kuwait.
There exists a variation of the Islamic calendar known as the tabular Islamic calendar in which months are worked out by arithmetic rules rather than by observation or astronomical calculation. It has a 30-year cycle in with 11 years are leap years with 355 days instead of 354 days. In the long term, it is accurate to one day in about 2500 years. It also deviates up to about 1 or 2 days in the short term.
Forbidding intercalary months
In the ninth year after the Hijra, Muhammad forbade the intercalary month. This is expressed in the Qur'an (9:36-37):
This prohibition was repeated by Muhammad during his last sermon on Mount Arafat which was delivered during his farewell pilgrimage to Mecca on 9 Dhu al-Hijja AH 10 (this paragraph is often deleted from the sermon by its modern editors as now unimportant):
The three successive holy months are Dhu al-Qada, Dhu al-Hijja, and Muharram, thus excluding an intercalary month before Muharram. The single holy month is Rajab. According to 9:36, Muslims may not fight pagans during these holy months.
Names of the Islamic months
The Islamic months are named as follows:
Of all the months in the Islamic calendar, Ramadan is the most sacred, during the daytime of which no Muslim may eat food or drink liquid, except for those who are ill or traveling, who must make up the days missed later. 'Daytime' begins at dawn, traditionally when a white thread can be distinguished from a black thread, but now often equated with astronomical dawn, which occurs when the center of the sun is 18° below the eastern geometric horizon. It ends at sunset, when the entire disk of the sun has gone below the actual western horizon, even if substantially elevated above the ideal horizon by mountains.
Names of the days of the week
These follow the Jewish and Christian order, beginning with Sunday and ending with Saturday. Thus Friday, the weekly holiday, is neither the first nor the last day of the Islamic week.
Important dates in the Islamic (Hijri) year are:
Portions of the Islamic calendar years 1424 and 1425 occur in the Gregorian calendar year 2004. January 1, 2004 is 8 Dhu al-Qa'da 1424 AH. 1 Muharram 1425 AH is February 22, 2004.
For a very rough estimate, multiply the Islamic year number by 0.97, and then add 622 to get the Gregorian year number.
The Islamic calendar year of 1429 occurs entirely within the Gregorian calendar year of 2008. Such years occur once every 33 or 34 Islamic years (32 or 33 Gregorian years). More are listed here: