The Islamic, or Hijri, calendar is purely lunar: its twelve months follow the phases of the moon, each beginning with the sighting of the new crescent, and its year of about 354 or 355 days takes no account of the solar seasons. Because it is some eleven days shorter than the solar year, its months and festivals move steadily earlier through the Gregorian year, completing a full circuit in about thirty-three years, so Ramadan and the Hajj fall in every season over time. Its era, AH, counts from the Hijra, the migration of the Prophet Muhammad from Mecca to Medina in 622 CE. Four of its months are sacred, and its rhythm governs the fasts, feasts, and pilgrimage of Islam. These are the features of the Islamic calendar tradition, kept by observation of the moon and, in some usages, by calculation.
The twelve Hijri months, Muharram, Safar, Rabi al-Awwal, Rabi al-Thani, Jumada al-Ula, Jumada al-Akhirah, Rajab, Shaban, Ramadan, Shawwal, Dhu al-Qadah and Dhu al-Hijjah, alternate nominally between 30 and 29 days, though actual month lengths depend on how each is fixed. Four are traditionally sacred, Muharram, Rajab, Dhu al-Qadah and Dhu al-Hijjah, months in which warfare was restricted in pre-Islamic and early Islamic custom. In practice, Muslim-majority states differ in method: some retain local moon-sighting committees, others use the tabular Islamic calendar, a fixed 30-year arithmetical cycle with eleven leap years adding a day to Dhu al-Hijjah, and Saudi Arabia's civil Umm al-Qura calendar is calculated astronomically for administrative purposes while religious observances there still typically follow sighting announcements.