I recently reviewed a book on PHP where the author in explaining the use of the available calendar functions made a statement that showed a complete lack of knowledge of the different calendars. The problem is that there are three different calendar related systems that all have "Julian" in their names even though they have little else in common.
A full understanding of these different calendars is not necessary to be able to use these conversion functions in your programming but having some knowledge of the difference between them will probably be useful. The following descriptions probably tell you more than you need to know but the extra information may help you to remember which of these similarly named calendars is which.
Note that PHP does not support the Julian Calendar but it does support the French revolutionary calendar, the Jewish calendar, and the Moslem calendar in addition to the other calendars listed below.
The Julian calendar was introduced by Julius Caesar in 46BCE (before common era) to rectify the situation where the year was continually getting out of step with the seasons. He replaced a system where leap months were added at the whim of the current ruler with a specific set of rules as to how an extra day should be added to the last month of every fourth year. 46BCE itself ended up having over 400 days (resulting in its being known as the "Year of Confusion") in order to bring the spring equinox back to March 25th which was the Roman new year. As a result of this calendar reform the fifth month (the first of the year that was still only numbered rather than having an actual name) was named in his honour.
At that time the months alternated between 31 and 30 days with one day less in the last month of the year when it wasn't a leap year. After Julius' death his nephew became the first Roman Emperor and he felt that as his uncle had a month named after him that there ought to be one named after the new Emperor as well The sixth month was therefore renamed and so that his month was not shorter than that named after his uncle the month lengths were rearranged to their current lengths with the extra day being moved from the twelfth month to bring the sixth month to 31 days.
Even today these two months and the four months following still have equivalent names today in English to the Latin versions at that time being known as July (named after Julius), August (named after Augustus), September (7th month), October (8th month), November (9th month), and December (10th month).
Just as an aside. The winter equinox which then fell on 25th December was an important pagan festival intended to convince the sun to return for another year. The early Christians not knowing the actual date of Christ's birth and being forced to participate in this festival (at least in some areas) adopted the day as the birth of the son. Christmas day has been fixed on that day ever since even though it was later worked out that Christ was most likely born in June 4BCE.
Of course the Julian calendar wasn't perfect and the year again started slipping against the seasons but now it slipped regularly by just under three days every 400 years instead of sliding backwards and forwards from year to year at the whim of whoever was in charge. By the time of Emperor Constantine and Christianity becoming the official religion of Rome the year had moved so that the equinox now fell on the 21st March instead of the 25th where Julius Caesar had originally put it. The religious conventions at that time therefore used the 21st March as the starting date for their calculations of when Easter should fall in the calendar.
The Julian calendar continued to slip by just under three days every 400 years and is now another 13 days out with the equinox now falling on March 8th in that calendar. That is not so relevant now though because no one uses that calendar any more. In 1582 Pope Gregory first introduced the Gregorian calendar to the Catholic countries of Europe. By the early years of the 20th Century the Gregorian calendar was officially adopted in all countries as THE calendar. There are a number of churches that still use the Julian Calendar within the church but it has effectively fallen out of use everywhere else.
There were a couple of significant changes introduced with the Gregorian Calendar. Firstly the leap year rules were slightly modified to remove three leap years every four hundred years. Those years divisible by four and 100 that are not also divisible by 400 are no longer leap years under the new system. This means that the calendar now matches the seasons much more closely as this calendar will only move forward by one day every 3300 years instead of back by three days every 400 years the way the Julian calendar did. This means that the year 2100 (for example) will not be a leap year.
The primary purpose in introducing this calendar as far as the Catholic church was concerned was to bring the equinox back to the 21st March where it would be "correct" for their Easter calculations. This meant that 10 days were dropped from the calendar when it was first introduced in Europe as that was how many days the calendar was then out by. When the calendar reform reached the English speaking world in 1752 there were 11 days that needed to be dropped. This led to peasant riots due to landlords still charging a full month's rent for a nineteen day month. The Chartered accountants decided that it was too difficult to do calculations for a year of the wrong length and so they shifted their year end back by eleven days into early April. The English financial year still starts and ends in early April as a result.
The final change that was made was to shift when the year started from the Spring equinox the the first day of what had been the eleventh month but which now became the first month in the new calendar. This month was renamed after the Roman god with two faces (one looking forward and one looking back) as it was felt appropriate that Janus could look back to the old year and forward to the new at the same time.
As a result of these changes we have the calendar that we use today and no further adjustments to the leap year rules will be required until 4882 when an extra leap year will be needed to bring the calendar back in step with the seasons.
Not to be confused with the Julian calendar. Julian dates simply drop the concept of months and number the days of the year within the Gregorian calendar. 1st January is day one and 31st December is day 365 (or 366 in leap years).
Also not to be confused with the Julian Calendar or Julian Dates. Julian days drops the concept of years and months and just numbers days sequentially starting with one and continuing indefinitely.
The concept was first introduced in 1582 as an alternative to the Gregorian Calendar but was not adopted at that time. 1st January 4713BCE was picked as day one as that was the last time that the Julian 28 year cycle, the 19 year lunar cycle and 15 year Roman Indiction cycle all commenced on the same day (these three cycles were important for the calculation of Easter).
The same concept was reintroduced in 1849 by John Hershel for use by astronomers who needed an easy way to keep track of the number of days between events although it was not adopted officially by the Astronomical Society until 1884. The Astronomers didn't really care about the reasons for the selection of that start date, they just needed a way of numbering days and that start date was far enough in the past to avoid needing to use negative numbers for events in historic times). Unlike other calendars which were adjusted for local time zones, Julian Days were defined to always start at noon Greenwich Mean Time.
A more recent expansion of the use of Julian days has resulted in the start of each day being moved 12 hours earlier to coincide with the midnight start that is expected by those using the Gregorian calendar.
This article written by Stephen Chapman, Felgall Pty Ltd.