Julian Day Algorithms for Non-standard Calendars

Algorithms for the Standard Calendars

The Julian Day algorithms for the Julian and Gregorian calendars are in my page Julian Day Number Algorithms. The ones on this page cover non-standard calendars.

Standard Date Class Declaration

The following is a standard part of all of the algorithms that follow:

class Date(object): def __init__(self,year,month,day): self.year=year self.month=month self.day=day return def __repr__(self): return ("Date("+repr(self.year)+","+repr(self.month)+","+repr(self.day)+")")

Algorithms Experimental Only

Because the following calendars are not in actual use, I regard these algorithms as being experimental; that means that I have not tested them as extensively as I have the ones for the Julian and Gregorian calendars, nor do I provide algorithms to avoid negative operands to the integer division and modulus functions if the date is too early, though they should still work for languages in which integer division and modulus functions are defined properly (as they are in Python, but not in C).

"Revised Julian" calendar

The "Revised Julian" calendar was invented in 1923. The difference between it and the Julian calendar is that years divisible by 100 are not leap years, unless they also have a remainder of 200 or 600 when divided by 900. This is similar to the Gregorian calendar which differs from the "Revised Julian" calendar only in the last rule of making a century year a leap year when it is divisible by 400. In fact, it is too similar to the Gregorian calendar to be taken seriously as a calendar in actual use, despite the claims of some Eastern Orthodox Christians to be using it: the choice to drop 7 leap days in 9 years was motivated by the desire to be closer to the true mean tropical solar year, but the choice of 200 and 600 as remainders in the final rule was to make it agree with the Gregorian calendar as long as possible, as one can see when one considers the century years made leap by the given rule, 1500, 2000, 2400, 2900. Note that two century leap years are common to both calendars. The number of days difference between the two calendars becomes 0 on 1600 March 01 and remains so until 2800 Feb 28. That is when the Gregorian calendar has a leap day and the "Revised Julian" calendar does not. The following table shows the difference in days between the Gregorian and the "Revised Julian" calendars:

Start End Duration Difference
1500 Mar 01 1600 Feb 28 100 -1
1600 Mar 01 2800 Feb 28 1200 0
2800 Mar 01 2900 Feb 28 100 1
2900 Mar 01 3200 Feb 28 300 0
3200 Mar 01 3300 Feb 28 100 1
3300 Mar 01 3600 Feb 28 300 0
3600 Mar 01 3800 Feb 28 200 1
3800 Mar 01 4000 Feb 28 200 0
4000 Mar 01 4200 Feb 28 200 1
4200 Mar 01 4400 Feb 28 200 0
4400 Mar 01 4700 Feb 28 300 1
4700 Mar 01 4800 Feb 28 100 0
4800 Mar 01 5100 Feb 28 300 1
5100 Mar 01 5200 Feb 28 100 0
5200 Mar 01 6400 Feb 28 1200 1
6400 Mar 01 6500 Feb 28 100 2
6500 Mar 01 6800 Feb 28 300 1

I don't seriously believe that many of the Eastern Orthodox churches supposedly using the "Revised Julian" calendar will observe their fixed holidays one day off from the Gregorian calendar for 100 years in the century of the 2800's, only to go back to alignment for 300 years, and then for a further 2000 years wobble back and forth between being in alignment to being one day out of alignment, until the final day that the "Revised Julian" calendar is ever aligned with the Gregorian on 5200 February 28. Some "Old Calendarists" within the Eastern Orthodox church have the same suspicion:

It is interesting that from the year 1600 to the year 2799, a span of 1200 years, the Gregorian and "Revised Julian" calendars agree exactly. From 2800 to 2899 they differ by one day, after which they again agree for another three hundred years. One may wonder whether for ecclesiastical purposes the adherents of the "Revised" calendar will celebrate their Holy Days one day earlier than the rest of the world for one century, or whether after so many centuries of agreement, they might not tacitly leave the matter as it had been.

Some adherents of the New Calendar claim that they have adopted a "Revised Julian Calendar", rather than the Papal Gregorian Calendar, and therefore they do not come under any penalty of the bans on that calendar adopted by the Pan Orthodox Councils of 1582 and 1583. However, for centuries to come, there is no practical difference between the Gregorian and "Revised Julian" calendars. They amount to the same thing. ... One may wonder why one should devise a revision that is practically the same as that used by most of the world, and yet diverges in the distant future. For the next 800 years we would follow identical calendars, then by the time they diverge, the matter will have been settled one way or the other, and everyone would then remain on the same calendar. It is not too hard to guess which way will win (source).

Because of this issue, I regard the "Revised Julian" calendar as not being in actual use, and as such its algorithm is treated as experimental.

Algorithms for "Revised Julian" Calenders

def cal2jd_ortho(date): year=date.year month=date.month day=date.day if (month<3): year=year-1 month=month+12 jd=365*year+year//4 jd=jd-year//100+(year+300)//900+(year+700)//900 jd=jd+(153*(month+1))//5+day-123 jd=jd+1721120 return jd def jd2cal_ortho(jd): day=jd-1721120 a=(9*day+2)//328718 day=day+a-(a+3)//9-(a+7)//9 year=(4*day+3)//1461 day=day-(1461*year)//4 month=(5*day+2)//153 day=day-(153*month+2)//5 day=day+1 month=month+3 if (month>12): month=month-12 year=year+1 return Date(year,month,day)