The Islamic calendar begins with Muhammad's migration from Mecca to Medina. This flight, called the Hegira, took place in A.D. 622 by the Gregorian calendar.
The Islamic year is based on the moon, and has 12 months, alternately 30 and 29 days long. These months are Muharram, Safar, Rabi’al Awal, Rabi’al Thaani, Jamaada Awal, Jamaada Thaani, Rajab, Sha`ban, Ramadăn, Shawwăl, Dhu-l-qa'adah, and Zulhijjah.
The Islamic year is much shorter than the solar year, with only 354 days. As a result, the Islamic New Year moves backward through the seasons. It moves completely backward in a course of 32 1/2 years. The Islamic calendar divides time into cycles 30 years long. During each cycle, 19 years have the regular 354 days, and 11 years have an extra day each. This method of counting time makes the Islamic year nearly as accurate in measuring the lunar year as the Gregorian year is in measuring the solar year. The Islamic calendar would be only about one day off every 2,570 years with respect to the moon. The Gregorian calendar would be only a little more accurate with respect to the sun.