Intercalation (timekeeping)

Calendars are commonly based on the rotation of celestial bodies, such as the sun or the moon. These calendars periodically add a certain time unit, to make the calendar follow the rotation more closely, which is known as intercalation. As an example, the solar year is about 365,25 days long. The Gregorian calendar says that the year has 365 days, but that roughly every four years, an extra day is added. 
Another example is the Jewish calendar, which is a lunisolar calendar. In addition to the 365,25 days of the solar year, there are the 29.5 days in a lunar month. This gives the problem that the year does not have twelve months, but about 12.4 months. The calendar solves this problem by adding an extra month in certain cases.