Earth, Moon and Planets, 74 (1996), No. 3, 223 – 230.
KAZIMIERZ M. BORKOWSKI
Torun Radio Astronomy Observatory, PL 87100 Toruń, Poland
(Received 10 October 1996, accepted 10 November 1996)
Abstract. Using the analytical theory of the motion of the Earth around the Sun the times of the vernal (Spring) equinox has been calculated over the period from the Hijra (AD 622) to AD 3800. These data alone allow to decide whether a particular Persian (or Jalaali) calendar year is common or leap. Presented analysis shows that an algorithm implemented in the so called Khayam program is valid for the years 1799 to 2256 (1178 to 1634 Jalaali). A concise algorithm has been worked out that reconstructs the pattern of leap years over time span of about 3000 years. FORTRAN routines for conversion between the Jalaali, Gregorian and Julian calendars and the Julian Day Number are presented. 
The Persian or Jalaali calendar is officially used in Iran and surrounding areas. It is a solar calendar closely following the astronomical seasons, thus requires the knowledge of exact times of the vernal (Spring) equinox.
The rules of the Jalaali calendar are quite simple. Years of 12 months are reckoned from the era of the Hijra, commemorating the migration of the Prophet and his followers from Mecca to Medina in AD 622. A Jalaali year begins on the first day of astronomically determined spring or on the day following it according to whether the exact moment of the equinox occurs before or after, respectively, 12:00 of the Teheran mean time. The first 6 months all have 31 days and the last 6 manths all have 30 days in leap years. In common years the last month has 29 days. Thus every season is associated with three consecutive months.
As expected, roughly every fourth year in the Persian calendar is the leap one. This is the well known regularity in solar calendars. However, normally after every 32 (sometimes after 28 or 36) years follows an extra common year making four consecutive 365day years instead of the usual three. Currently the leap years go smoothly in the 33year cycles and specifically they are those years that after dividing by 33 leave a remainder of 1, 5, 9, 13, 17, 22, 26 and 30. E.g., the Jalaali year 1375 that begun on March 20, 1996 has the remainder of 22 and thus is the leap year. These rules are implemented in the so called Khayam program of Ali Moayedian and Mash CheraghAli, which is available on the Internet. Unfortunately this simple behaviour will not last indefinitly and the 33year cycle is sure to break sometimes. Hossein Bagherzadeh Rafsanjani in his introduction to the program suggests that a break may occur `early in the next century Hijra' and that the program should be correct until early 2050's of Gregorian calendar. It is the purpose of this paper to determine exactly how long the above rule of remainders will be valid and to establish the rules for the Jalaali calendar as far into future as is presently practical.
In general, to determine if a Persian year is leap or common it is necessary to
find the date and time of the vernal equinox at the beginning of that year and
at the beginning of the next year. To this end I have employed an analytical
theory of the motion of the Earth around the Sun (Bretagnon et al.1986),
which is accurate to about 2′′
in the angular coordinates of the Sun as
viewed from the Earth. The theory has been used in a converging process to
find the Terrestrial Time (TT or Ephemeris Time) of the epoch at which the
celestial longitude of the Sun equalled 0. The TT of the equinox has been
then converted to the Universal Time (UT1) using past estimates, measurements,
and future predictions of the difference
ΔT = TT –
UT1 = 32.184 –
(UT1 – TAI), where TAI is the atomic time scale of BIPM.
For past years and far future predictions I have used essentially
tabular data and formulae of Stephenson and Morrison (1984):

In Table I we present partial list of vernal equinoxes given in the Universal Time that might be of general interest. As a final step, the mean time of Teheran has been calculated by adding its geographic longitude, 3.425 hours, to the UT1 of the equinoxes.

A full list of equinoxes comprising the years AD 550 to 3800, referred to the Teheran time has been used to identify the leap years of the Jalaali calendar. The pattern of leap years is quite regular: they come every 4 years in groups of 28, 32 or 36 years with each group supplemented with an extra common year. Usually these are 32+1 year groups and the few occasional exceptions, called here breaks, can be used in a practical procedure to reconstruct the entire sequence of leap years. In Table II the Jalaali years represent the first year (leap) of a new cycle (mostly the 33year cycle) after a break (i.e. after the 4th common year closing the 28 or 36 year group).
Table II: The years of the Gregorian calendar (Gy) that mark the end of a 29 or 37year period which breaks the 33year rule validity. Around 20 March Gy ends the 4th common year and begins the Jalaali leap year Jy 

As can be seen from Table II, the 33year cycle operates continuously between 1831 and 2256. Closer examination shows that in fact it operated from 1799, since 1831 marks just the end of the 29year period, and would not appear here if the previous break would fall four years earlier. This is thus the time span of validity of the Khayam algorithm. There is however a possibility that it will not be as good as that and the upper limit may fall on AD 2124. I shall return to this question when discussing errors.
The proposed algorithm is based on the described list of the breaking years in which the fourth common Jalaali year occurs after 28 or 36 (and not 32) years of 4year periods since the previous occurence of four common years in succession. During 3000 years there are only about 20 such breaking years, and they allow for an easy reconstruction of a complete sequence of Jalaali leap years.
To determine whether a Jalaali year is common or leap, one finds the number,
say N, of years that have passed since the last breaking year of
Table II. With one exception, the year of interest
is leap if –1 plus the remainder of (N + 1)/33 is
evenly divisible by 4, or

Using the integer arithmetic this algorithm reduces to just two FORTRAN lines (apart of searching the list for the required breaking years). For the common years the remainder of division by 4, i.e. l_{p}, tells how many years have passed since the last leap year. E.g. the remainder of 1 (2 or 3) means that the leap year was the previous one (2 or 3 years ego). Obviously, it is also possible to tell whether the considered year is the 4th common one. The case occurs when N + 1 (or N + 1 ± 4 if it is the exceptional situation), is evenly divisible by 33.
To relate the Jalaali calendar to the Gregorian one it is necessary to
find the number of leap years since an initial epoch in both these calendars.
In the Jalaali calendar, the number of leap years between two adjacent break
years of Table II, say between y_{i} and y_{j} is


This algorithm has been encoded in the FORTRAN integer arithmetic subroutine (Table III) JalCal(Jy,leap,Gy,March), which for a given Jalaali year Jy returns information on the leap year in the leap variable, which assumes values 0 to 4, as described above. The routine returns also the Gregorian date of the first day of the Jalaali year in the variables Gy (Gregorian year) and March (day of March). Thus it can be directly used to relate the beginning of the Persian calendar for any year within about 3000 years to the Gregorian calendar.

Such a procedure can be employed for full date conversion from the Persian
calendar if we note that until the Jalaali date m (month) and d (day)

Practical programs were written and tested for convertion of Jalaali calendar, first into the Julian Day number (JD), and then into the Gregorian or Julian calendar, and also for reverse conversion of these calendars to the Persian one. The following procedures in FORTRAN serving this purpose are available from the author (see this complete coversion program listing and the DOS executable):
Due to approximate nature of the ephemeris the results of the equinox time may be in error of about 1 minute of time. Uncertainty of ΔT adds to the error of the final result. This parameter is very well known from direct observations only back to about AD 1630.
Table IV: Critical years in the Jalaali calendar most likely to alter the sequence of breaking years. The first four columns give Gregorian date in March, the Teheran mean time (in hours and minutes) of the vernal equinox, and the value of ΔT = TT – UT1. Then there is the day in March of the first day of the Jalaali year (Farvardin the 1^{st}) and the year itself. The last column shows possible additions (+) to and subtractions (–) from the breaking years list of Table II. 

The past breaking years, as being purely astronomical and based on contemporary knowledge, may not coincide with the actual Jalaali calendar, used then for astronomical purposes only. Also, the future breaking years of Table II may disappear altogether or new ones will have to be introduced depending on real rotation of the Earth (the behaviour of the ΔT value). The most critical years are listed in Table IV, where the date in March (Gregorian calendar) and the predicted Teheran mean time are given along with the assumed ΔT value. The table contains all the cases that the equinox time is removed from 12:00 Teheran time by less than (1 + ΔT/10) minutes, where the 1 minute is due to uncertainty of the equinox determination and the other term is intended to account for 10% error in ΔT (an ad hoc error estimate). The Jalaali years indicated in Table IV are leap years if the equinox time is less than 12:00, otherwise the previous year is leap. The expected change to be introduced to the list of breaking years in case the actual equinox time shifts across the noon point (12:00) due to combined effect of the ephemeris error and a change in ΔT, is shown in the last column of this table.
It will be noted, that the discussed change affects only the year in question (shifting it by one day relative to e.g. Gregorian calendar) and the last day of the previous Jalaali year. Thus the algorithm in the form presented may lose its validity only for some of the future Jalaali years given in Table IV. In the worst case, if my estimates of ΔT are systematically low, the 10 critical years with equinox greater than 12:00 of that table may drop to less then 12:00 and thus the corresponding Jalaali years would shift by one day into the previous year, themeselves becoming the leap years. Should the ΔT be systematically high instead, there would be only 7 future years of Table IV endangered by an opposite shift.
2124 is the nearest doubtful year. The Teheran times of the vernal equinox indicate that in this year the 1503 Jalaali year starts on 21 March and not on 20 March just because the calculated equinox time was only about one third of a minute past 12:00 (see Table IV). Thus if ΔT will be greater by some 20 seconds than predicted in this analysis, this year will become an additional breaking point to be added to the presented algorithm along with another one 37 years later (1540 Jalaali).