The Gregorian Calendar

This is a synopsis of information in the Java documentation and several other sites.

The Java SE GregorianCalendar class is a hybrid calendar that models both the Julian and Gregorian calendar systems with a single discontinuity (called the cut-over date or simply, the cut-over), which corresponds by default to the date when the Gregorian calendar was instituted (October 15, 1582 in some European countries, but later in most others). The only difference between the Gregorian and the Julian calendar is the leap year rule. The Julian calendar specifies leap years every four years, whereas the Gregorian calendar treats century years which are not divisible by 400 as normal (non-leap) years.  For instance, 2000 is a leap year, but 1900 is not.

GregorianCalendar implements the proleptic Gregorian calendar. That is, dates are computed by extrapolating the rules indefinitely far backward and forward in time.  So GregorianCalendar may be used for all years to generate meaningful and consistent results.  However, dates obtained using GregorianCalendar are historically accurate only from March 1, 4 A.D. onward, when modern Julian Calendar rules were adopted. Before this date, leap year rules were applied irregularly, and before 45 BC the Julian calendar did not even exist.

The Date Difference Calculator uses a lenient implementation of GregorianCalendar.  This means that if an invalid date is selected, it is automatically corrected based on the constraints of the calendar.  For example, if you specify a date of February 30, 1982, it will be reset as February 28, 1982.  Similarly a date of February 30, 1984 will be reset as February 29, 1984, since 1984 is a leap year.

GregorianCalendar correctly models the transition between the Julian and Gregorian Calendars. There is no accommodation in the current Calculator to model events in countries that adopted the Gregorian Calendar later.

The Date Difference Calculator operates on the simplifying assumption that the Gregorian Calendar was uniformly adopted everywhere at all times.  It makes no attempt to consider numerous time schemes that were in place prior to the advent of internationally-adopted timekeeping standards, in the late nineteenth and early twentieth centuries. In the United States, prior to establishing the transcontinental railroad system in the 19th century, most cities and towns used the position of the sun to determine time, so local time varied by longitude, even over a short distance.  The four North American time zones in use today were not established until 1883.  And to give a sense of the complications in local time-keeping systems in Europe at the time, consider this excerpt from the April 1911 issue of Scientific American:

"On February 10, 1911, the French Senate passed a bill which makes Greenwich time legal in France.  When the law goes into effect, French time will become nine minutes and twenty-one seconds slower than it is now...French railways are now run by a standard five minutes slower than Paris time, and the clocks inside stations are regulated by this standard, while the clocks outside the station give the correct Paris time.  This confusing system will be abolished, and both exterior and interior clocks will be regulated by Greenwich time, by which the trains will be run."