Today Iran uses a solar calendar with a leap day system which is older but more scientifically accurate than the Gregorian calendar. The present Iranian calendar's leap day system was devised in the 11th century by a panel of scientists including Omar Khayyam, who was one of the foremost leading mathematicians and astronomers of his time, but today is well-known in the West for his poetry.
The Iranian solar calendar year begins with the midnight closest to the instant of vernal equinox, when the sun enters the northern hemisphere; in other words, the start of Spring in the northern hemisphere. The first day of this calendar year is also the day of the greatest festival of the year in Iran called Norouz (a single word made up of two parts, no and rouz, meaning "new day"). The calendar consists of 12 months which have Persian names. The first six months are 31 days each, the next five 30 days, and the last month has 29 days but 30 days in leap years. The reason the first 6 months have 31 days and the rest 30, is not a random decision -- it has to do with the fact that the sun moves slightly more slowly along ecliptic in the northern spring and summer than in the northern autumn and winter.
The Persian new year is determined by noon-time observation of the Northern spring equinox. If between two consecutive noons the sun's altitude rises through its equinoctial altitude then the first noon is on the last day of one calendar year and the second noon is on the first day (Norouz)of the next calendar year.
Typically leap years are devised and used by various solar calendar systems, usually every four years. Four-year leap years add 0.25 day to each year in the period. But that is a slight overcompensation compared to the actual behaviour of the sun. Remedying this overcompensation, after about every seven four-year leap years, the Persian solar calendar produces a five-year leap year, thus following a thirty-three year cycle for many centuries before interruptions by single twenty-nine year subcycles.
This general picture of the Persian calendar's leap-year behaviour contrasts with other ill-informed predictive algorithms which are based on confusion between the astronomers average tropical year (365.2422 days, approximated with mistaken near 128-year cycles) and the mean interval between vernal equinoxes (365.2424 days, approximated here with a near 33-year cycle).