The Islamic calendar or Muslim calendar or Hijri calendar (Arabic: التقويم الهجري; at-taqwīm al-hijrī; Persian: تقویم هجری قمری taqwīm-e hejri-ye qamari; Turkish: Hicri Takvim) is a lunar calendar used to date events in many predominantly Muslim countries, and used by Muslims everywhere to determine the proper day on which to celebrate Islamic holy days and festivals. It is a 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, Islamic holy days, although celebrated on fixed dates in their own calendar, usually shift 11 days earlier each successive solar year. Islamic years are also called Hijra years because the first year was the year during which the Hijra occurred - Islamic prophet 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 current Islamic Year is 1430 AH, from approximately December 28, 2008 (evening) to December 17, 2009 (evening).
The Arabian predecessor to the Islamic calendar was a lunisolar calendar which used lunar months, but was also 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 debated. 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. However, 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. Moreover, Arabs had months in which fighting was forbidden. So they used the intercalary month to manipulate the time in which these months occur. And the intercalary month was no longer allowed (releasing the calendar from the seasons) by Sura 9, verse 36 (believed to have been revealed about the end of Muhammad's lifetime), which implies a pre-Islamic year beginning near the vernal equinox because that is when the modern lunar year began during his last year.
The number of months with Allah has been twelve months by Allah's ordinance since the day He created the heavens and the earth. Of these four are known as forbidden [to fight in]; That is the straight usage, so do not wrong yourselves therein, and fight those who go astray. But know that Allah is with those who restrain themselves.
Verily the transposing (of a prohibited month) is an addition to Unbelief: The Unbelievers are led to wrong thereby: for they make it lawful one year, and forbidden another year, of months forbidden by Allah and make such forbidden ones lawful. The evil of their course seems pleasing to them. But Allah guideth not those who reject Faith.
O People, intercalation is an addition to unbelief, through it [God, Allah] leads the unbelievers astray: they make it permissible one year and forbid it [at their mere convenience] the next one to elude the timing of what God forbade, so that they make permissible that which Allah forbade [fighting in the forbidden months], and forbid that which Allah has made permissible [fighting in other months]. And [now, this year] time has turned the way it was the day God created Heavens and Earth [The intercalary months since the creation of Heavens and Earth have all canceled out (summed up to whole years)]. The year is twelve months, four of them are forbidden, three successive: Dhu al-Qi'dah and Dhu al-Hijjah and Muharram; and the Rajab of Mudar which is between Jumada and Shaban.
The three successive forbidden months mentioned by Muhammad (months in which battles are forbidden) are Dhu al-Qi'dah, Dhu al-Hijjah, and Muharram, thus excluding an intercalary month before Muharram. The single forbidden month is Rajab. These months were considered forbidden both within the new Islamic calendar and within the old pagan Meccan calendar, although whether they maintained their "forbidden" status after the conquest of Mecca has been disputed among Islamic scholars.
As the number and the position of the intercalary months between 1 AH and 10 AH are uncertain, western calendar dates commonly cited for key events in early Islam such as the Hijra, the Battle of Badr, the Battle of Uhud and the Battle of the Trench, should be viewed with caution as they can be in error by one, two or even three lunar months.
The Islamic months are named as follows:
In the Arabic language, as in the Hebrew language, the "first day" of the week corresponds with Sunday of the planetary week. The Islamic and Jewish weekdays begin at sunset, whereas the medieval Christian and planetary weekdays begin at the following midnight. Muslims gather for worship at a mosque at noon on "gathering day" (yaum al-jumu'a) which corresponds with Friday. Thus "gathering day" is often regarded as the weekly day of rest, so the following day, Saturday, is often regarded as the first day of the work week.
According to Islamic tradition, Abraha, governor of Yemen, then a province of the Christian Kingdom of Aksum (Ethiopia), attempted to destroy the Kaaba with an army which included several elephants. Although the raid was unsuccessful, because it was customary to name a year after a major event which occurred during it, that year became known as the Year of the Elephant, which was also the year that Muhammad was born (see surat al-Fil). Although most Muslims equate it with the Western year 570, a minority equate it with 571. 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 (AH 17), the second Caliph Umar 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 (the actual emigration took place in September). The first surviving attested use of the Hijri calendar is on a papyrus from Egypt in 22 AH, PERF 558.
Upon Muhammad's arrival at the city of Medina after his hijra from Mecca, his companions named that year as their first year. It was one of the practices of the people of that time to start their calendar with a certain event.
The arrival of Muhammad at the city of Medina was the first victory for Muslims. For the first time Muslims gained the right to run a country based on Islamic teachings led by Muhammad himself. It came naturally to the Muslims at that time to name the year of Muhammad’s arrival at Medina as the first year. This act was not forbidden by Muhammad, and they continued to count their years from the Hijra year onwards.
In the year 17 AH, Abu-Musa al-Asha'ari, one of the officials of the second Caliph Umar in Basrah, reported that a letter from Umar arrived without any date records. This report triggered Umar to introduce a calendar system for Muslims. Umar called the renowned companions such as Ali for a meeting to seek their views on a suitable calendar for Muslims. Some of them suggested using the Messiah calendar (Byzantine calendar) which was already followed by many people at that time. There were also some who suggested starting the calendar from the birth of Muhammad. These suggestions were rejected, because the starting dates of those two calendar systems were rather uncertain.
It was thought that the Islamic calendar should start on an unambiguous date, and a date that was known by many people. There was a suggestion to start on the date of the death of Muhammad, and there were some who suggested to begin with the date of the arrival of Muhammad at Medina. Umar chose to start the calendar with the date of Muhammad’s arrival at Medina, not only because it was a very significant event and was known by almost all Muslims at that time, but more importantly, the companions of Muhammad were already starting their calendar from that date, out of habit.
The second issue to be decided was what would be the first month of the calendar. Some suggested Ramadan, and some suggested the month of Rajab because it was a month much glorified by the Arabs before Islam came. Uthman Ibn Affan suggested to start the calendar with the month of Muharram, because it was already the customs of the Arabs at that time to start their year with the month of Muharram, after the return of the pilgrims from their Hajj. This suggestion was agreed by all who were present.
Thus the Islamic calendar started from the month of Muharram in the year of Muhammad’s arrival at the city of Medina, and because of the Hijra event the calendar was named the Hijra calendar.
The Islamic calendar is not to be confused with the lunar calendar. The latter is based on a year of 12 months adding up to 354.37 days. Each lunar month begins at the time of the monthly "conjunction", when the Moon is located on a straight line between the Earth and the Sun. The month is defined as the average duration of a rotation of the Moon around the Earth (29.53 days). By convention, months of 30 days and 29 days succeed each other, adding up over two successive months to 59 full days. This leaves only a small monthly variation of 44 mn to account for, which adds up to a total of 24 hours (i.e. the equivalent of one full day) in 2.73 years. To settle accounts, it is sufficient to add one day every three years to the lunar calendar, in the same way that one adds one day to the Gregorian calendar, every four years. The technical details of the adjustment are described in Tabular Islamic Calendar.
The Islamic calendar, however, is based on a different set of conventions. Each Islamic State proceeds with its own monthly observation of the new moon (or, failing that, awaits the completion of 30 days) before declaring the beginning of a new month on its territory.
But, the lunar crescent becomes visible only some 15–18 hours after the conjunction, and only subject to the existence of a number of favourable conditions relative to weather, time, geographic location, as well as various astronomical parameters. As a result, the beginning of each month differs from one Muslim country to another, and the information provided by the calendar does not extend beyond the current month.
If the Islamic calendar were prepared using astronomical calculations, Muslims throughout the Muslim world could use it to meet all their needs, the way they use the Gregorian calendar today. But, there are divergent views on whether it is licit to do so.
A majority of theologians oppose the use of calculations on the grounds that this would not conform with Muhammad's recommendation to observe the new moon of Ramadan and Shawal in order to determine the beginning of these months.
But, since there is no prohibition to use astronomical calculations in the Qur’an, some jurists see no contradiction between Muhammad’s teachings and the use of calculations to determine the beginnings of lunar months. They consider that Muhammad's recommendation was merely adapted to the culture of the times, and should not be confused with the acts of worship.  
Thus, jurists Ahmad Muhammad Shakir and Yusuf al-Qaradawi both endorsed the use of calculations to determine the beginning of all months of the Islamic calendar, in 1939 and 2004 respectively.  So did the "Fiqh Council of North America" (FCNA) in 2006  and the "European Council for Fatwa and Research" (ECFR) in 2007.
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 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 the Republic of India, 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 moon sets progressively later than the sun for locations further west, thus western Muslim countries are more likely to celebrate some holy days one day earlier than eastern Muslim countries.
The official Umm al-Qura calendar of Saudi Arabia used a substantially different astronomical method until recent years. 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 predominantly Muslim countries, including the dates for the Hajj, which can only be dated using Saudi dates because it is performed in Mecca. During one 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. Strictly speaking, the Umm al-Qura calendar is intended for civil purposes only. Their makers are well aware of the fact that the first visual sighting of the lunar crescent (hilal) can occur one to two days after the date calculated in the Umm al-Qura calendar. Since AH 1419 (1998/99) several official hilal sighting committees have been set up by the government of Saudi Arabia to determine the first visual sighting of the lunar crescent at the begin of each lunar month. Nevertheless, the religious authorities of Saudi Arabia also allow the testimony of less experienced observers and thus often announce the sighting of the lunar crescent on a date when none of the official committees could see the lunar crescent.
This is particularly the case for the most important dates on the Islamic calendar - the beginning and end of Ramadan (the month of the fast) and the beginning of Dhu al-Hijja (the month of the annual pilgrimage to Mecca). If a Muslim male resident (two in the case of the end of Ramadan) sees the new moon on the 29th day of the preceding month, and if this sighting is accepted by the religious authorities, then the new month is judged to have arrived, even though the official Umm al-Qura calendar calls for a 30th day before the new month begins. This can change the actual beginning and/or end of the fast (in the case of Ramadan) or the timing of the pilgrimage to Mecca (in the case of Dhu al-Hijja). This happens occasionally, with the most recent occurrences being in AH 1428 (2007-2008), when the beginning of the months of both Shawwal and Dhu al-Hijja occurred a day earlier than called for in the official Umm al-Qura calendar.
In 2007, the Islamic Society of North America, the Fiqh Council of North America and the European Council for Fatwa and Research have announced that they will henceforth use a calendar based on calculations, using the same parameters as the Umm al-Qura calendar, to determine (well in advance) the beginning of all lunar months (and therefore the days associated with all religious observances). 
See main article: Tabular Islamic calendar. 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 with 11 leap years of 355 days and 19 years 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.
See main article: Kuwaiti algorithm. Microsoft uses the "Kuwaiti algorithm" to convert Gregorian dates to the Islamic ones. Microsoft claims that it is based on a statistical analysis of historical data from Kuwait but it is in fact a variant of the tabular Islamic calendar.
See main article: Muslim holidays. Important dates in the Islamic (Hijri) year are:
For a very rough conversion, multiply the Islamic year number by 0.97, and then add 622 to get the Gregorian year number. An Islamic year will be entirely within a Gregorian year of the same number in the year 20874. 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:
|Islamic year within Gregorian year|
Because a hijri or Islamic lunar year is about 11 days shorter than a Gregorian year, it begins approximately eleven days earlier in the Gregorian year following the Gregorian year in which the previous hijri year began. Once every 33.58 hijri years, or once every 32.58 Gregorian years, the beginning of a hijri year (1 Muharram) coincides with one of the first ten days of January. Subsequent hijri New Years move backward through the Gregorian year back to the beginning of January again, passing through each Gregorian month from December to January. To find the Gregorian year and approximate Gregorian month within which a specific hijri year begins, locate that hijri year within the table above. Subtract from it the hijri year after the previous hijri year which occurred within a single Gregorian year (the coinciding year). For the hijri year 1344, the previous coinciding hijri year was 1329, so subtract 1330 from 1344, yielding 14. Add 14 to the coinciding Gregorian year of 1911 yielding 1925. To determine the approximate Gregorian month within which the stated hijri year begins, divide 14 by 33 (the coincidence period) and multiply by 12 months yielding 5.5 months before January. Thus hijri year 1330 begins within July 1925.
The Islamic calendar has been used primarily for religious purposes, and has sometimes been used for official purposes as well. Because of its nature as a purely lunar calendar, however, it cannot be used for agricultural purposes and historically Islamic communities have used other calendars for this purpose: the Egyptian calendar was formerly widespread in Islamic countries, and the Iranian calendar and the 1789 Ottoman calendar (a modified Julian calendar) were also used for agriculture in their countries. In Morocco, the ancient Julian calendar is still used by farmers in the countryside. These local solar calendars have receded in importance with the near-universal adoption of the Gregorian calendar for civil purposes. Saudi Arabia is currently the only Muslim country to use the Islamic calendar as the calendar of daily government business.