The Islamic calendar has twelve months, and it determines when Ramadan and the two Eids occur.
Unlike the Gregorian calendar, the Islamic calendar is based on lunar months. A month begins with the sighting of the new crescent moon, although some communities use calculated astronomical data instead. Each month normally has 29 or 30 days, giving an ordinary Islamic year about 354 or 355 days.
Because the lunar year is around 10 to 12 days shorter than the solar Gregorian year, Ramadan and Eid move earlier through the Gregorian calendar each year. Over a complete cycle of roughly 33 years, these observances pass through all seasons.
The twelve months include Ramadan, the ninth month, and Shawwal, the tenth month, which begins with Eid al-Fitr. Dhu al-Hijjah is the twelfth month and contains the Hajj pilgrimage and Eid al-Adha. The number of months is fixed, but their exact starting dates can differ between communities because of crescent-sighting practices.