# On the linear relation between two calendars

Given a date in the Islamic calendar , there is a formula which gives a good (approximate) numerical value of the corresponding date in the Gregorian calendar.

To find this formula or relation ,  we note that the ratio of a mean (lunar) year of The Islamic calendar to a solar year is:

$\frac {354 + \frac {11} {30}} {365.242} = 0.970224$

The first year of the Islamic (Hijra or Hegira) calendar started 19th July 622 according to the Gregorian calendar. 19th July is the 200th day of the year and is (approximately ) 0.5476 in parts of the solar year ,while the number of years elapsed is equal to ( y-1) . The days are distributed regularly in both calendars , so the date of the beginning of the year y in Gregorian years is :

$0.970224 (y-1)+622.5476$

which can be written as :

$y_ {\text {ch}} = 0.970224 y_ {\text {hj}} + 621.5774$     (1)

Solving the equation above for the year of the Islamic calendar we get:

$y_ {\text {hj}} = -640.653499 + 1.03069 y_ {\text {ch}}$    (2)

If we try to take a more accurate value for the average year length of  the Gregorian calendar  and take into account additional decimal digits , we get the following slightly more precise formulas replacing the two formulas (1) and (2) above :

yhjtoch(t) = 621.5773576247731 + 0.9702237766245703 t

and:

ychtohj(t) = -640.6536023959899 + 1.0306900573793625 t

Now if we solve the two equations (1) = (2) above or yhjtoch(t) = ychtohj(t) , we should find the date when the two calendars are equal and have the same day of the same month of the same  year . Solving (1) = (2) gives the result 20875.052079 , which corresponds to 19 days  (0.052079×365 ≈ 19) of the year 20875 , or 19th January 20875 , or 19/1/20875 .
yhjtoch(t) = ychtohj(t) gives the result 20874.956161756745132 , which corresponds approximately to the 349th day of the year 20874 , 16 days before the end of the year.
Using a calender converter (within Mathematica  or an online converter ) , we find that the dates when the two calendars are equal lie between 1/5/20874 and 30/5/20874 , i.e the first day of the 5th month (May) of the year 20874 in the Gregorian calendar is also the first day of the 5th month of the year 20874 in the Islamic calendar , and this goes on until the 30th day of the 5th month of the year 20874 in both calendars. Therefore we can see that the dates obtained by making equal the two sets of equations above deviate and are further away from the real dates verified with calendar converters.

From the beginning of the Islamic calendar to the year 20874 there is a very small increase in the difference between the days of the year for the Islamic and the Gregorian calendar, and for the year 20874 the difference between the 2 calendars (if we equate ychtohj(t) and yhjtoch(t) ) is about 215 days , so I made some calculations and I subtracted a small term (0.000001758733 times t) from the formula converting from the Islamic to Gregorian calendar yhjtoch(t) and I got the following :

yhjch(t) = 621.5773576247731 + 0.9702237766245703 t – 0.000001758733 t

yhjch(t) = 621.5773576247731 + 0.9702220178915703 t

yhjch(t) is a little more accurate than the equation (1) above , which differs from the real date by approximately one day for years and dates in the current (21st) century , then the gap widens between yhjch(t) and (1) , with yhjch(t) giving dates a little before the real date , and equation (1) a little after the real (Gregorian calendar) date.For the year 20874 yhjch(t) gives more precise dates.

Setting ychtohj(t) = ychj(t) and solving ychj(t) = yhjch(t) , we get the result 20874.349006727632514 ,which is a date that lies within the interval between 1/5/20874 and 30/5/20874 for the two calendars.

Below is a graph showing ychj(t) and yhjch(t) around t = 20874 and how they intersect :

So the two conversion formulas or linear equations ychj(t) and yhjch(t) can be considered to be the two most accurate ones for converting between the Islamic and Gregorian calendars.

Additional reference work related to this post :
Time measurement and calendar construction , by Broughton Richmond.