The Islamic calendar, also known as the Hijri calendar, is a lunar calendar consisting of 12 months in a year of 354 or 355 days. It is used to determine Islamic holidays and rituals. The calendar begins with the migration (Hijra) of the Prophet Muhammad from Mecca to Medina in 622 CE. Each month begins with the sighting of the new moon, and the months alternate between 29 and 30 days. The Islamic calendar is shorter than the Gregorian calendar by about 11 days, which is why Islamic holidays shift earlier each year in the Gregorian calendar.