The 1582 Julian/Gregorian Transition Calendar
By Jay Tanner
The calendar below represents the Julian/Gregorian transition calendar of October 1582, the official end (in Catholic countries and domains) of the old Julian calendar system and the inauguration of the modern Gregorian calendar we use today for most world trade and commerce.

J 1582      January
SunMonTueWedThuFriSat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
J 1582      February
SunMonTueWedThuFriSat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28      
J 1582      March
SunMonTueWedThuFriSat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
J 1582      April
SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
J 1582      May
SunMonTueWedThuFriSat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
J 1582      June
SunMonTueWedThuFriSat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
J 1582      July
SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
J 1582      August
SunMonTueWedThuFriSat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
J 1582      September
SunMonTueWedThuFriSat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
J/G 1582     October
SunMonTueWedThuFriSat
  1 2 3 4 15 16
SunMonTueWedThuFriSat
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
G 1582      November
SunMonTueWedThuFriSat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
G 1582      December
SunMonTueWedThuFriSat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  


The old Julian calendar officially ended on:
Thursday, October 4th, 1582.  - Highlighted in   yellow .
Julian Day Number = 2299160

The date following October 4th was the official beginning (in Catholic countries)
of the modern Gregorian calendar and that date was:
Friday, October 15th, 1582.  - Highlighted in   cyan .
Julian Day Number = 2299161

The transition year, 1582, was both a Julian and a Gregorian year- the first 277 days being on the Julian calendar and the last 78 days being on the Gregorian calendar, for a total of 355 calendar days that year due to the 10 dropped days.

Since it was implemented by a Catholic Pope, the Gregorian calendar at first was only binding on catholic countries.  It took hundreds of years for the Gregorian calendar to be adopted as the replacement for the old Julian calendar in non-Catholic countries and evolve to become the world standard calendar for international trade and commerce.  In fact, in the UK and in the USA, the Gregorian calendar was not adopted until September of 1752.

Previously, on the Julian calendar, every four years without exception was a leap year.  This was the error that was causing the problem.  Leap years were happening too often.  The error, although very small, was causing the dates of the start of spring to slowly drift away from March 21st.  As a result, after over 1500 years, the error accumulated to such an extent that true astronomical spring was starting on March 11th or some 10 days too early acccording to the Julian calendar.

The calendar reform of 1582 had two basic parts:
  • To bring the date of Spring back to March 21, as before, 10 days were dropped from the calendar immediately following October 4th, so that the following calendar date was October 15th, 1582.  This ensured that in the following year, 1583, Spring would be back on March 21st and a modified leap year rule applied thereafter.

  • The modified leap year rule:
    Generally, if the year divides perfectly by 4, then it is a leap year, otherwise it is not.  However, in the case of a century year, a year ending in double zeros, it is only a leap year if it divides perfectly by 400, otherwise it is not.
Since all century years on the Julian calendar are leap years, it means that all Julian centuries are of exactly the same length or 365.25 × 100 = 36525 days each.

Starting on January 1st of any Julian leap year:
4 Julian centuries contains exactly: 36525 + 36525 + 36525 + 36525 = 146100 days

On the Gregorian calendar, only one out of four century years is a leap year which means that if the first one is a leap year then it is followed by three consecutive century years which are NOT leap years and then the cycle repeats.  Only the fist century has the full 36525 days while the other 3 centuries have only 36524 days each because they each have 1 less leap year.

Starting on January 1st of any Gregorian leap year:
4 Gregorian centuries contains 36525 + 36524 + 36524 + 36524 = 146097 days

Consequently, 4 Gregorian centuries has 3 less days than 4 Julian centuries due to 3 fewer leap years.


The Gregorian Correction to the Julian Calendar or the Difference In Days Between Them

When the Gregorian calendar was first introduced, 10 days had to be dropped in the transition.  Since the British, and hence the Colonies, took so long to adopt the Gregorian calendar, that by the time they finally did, some 170 years later, 11 days, rather than 10, had to be dropped in the transition.  In the New England Colonies, the transition took place on Wednesday, September 2nd, 1752.  The following date was Thursday, September 14th, 1752.  Eleven days were dropped in the transition.

As of March 1st, 1800, until February 29th, 2100, we have to drop 13 days from the Julian calendar.

Let:
year = Calendar Year (Negative = BC year)
and
month = Month (1 to 12)

This algorithm can be used to compute the difference in days we have to apply to correct from the Julian to the Gregorian calendar on any day of the given month and year.  This value is applied to the Julian JD number of any Julian date to obtain the JD number of the corresponding date on the Gregorian calendar instead, which has a slightly earlier mathematical origin (JD=0) date.  This algorithm also applies to proleptic calendar dates.



A negative GregDiff value means we would have to drop that many days from the Julian calendar to obtain the corresponding date on the Gregorian calendar.  Note that the day (d) of the month is not needed to perform this computation.


EXAMPLE:

If we waited until April 15th, 2010 to switch from the Julian to the Gregorian calendar, what would be the calendar date following April 15th?

Let:
year = 2010,   month = 4  and  CalMode = 1

Then, applying the above algorithm gives:
 if (year < 0) then w = year+1 else w = year
 so
 w = 2010
 and
 u = floor((w - floor((14-month)/12)) / 100)
   = floor((2010 - floor((14-4)/12)) / 100)
   = floor((2010 - floor(10/12)) / 100)
   = floor((2010 - 0) / 100)
   = floor(2010 / 100)
   = 20

 and

 GregDiff =  floor(u/4) - u + 2
          =  floor(20/4) - 20 + 2
          =  5 - 20 + 2
          = -13
This means that if we had waited until April 15th, 2010 to switch from the Julian to the Gregorian calendar, then we would have had to have dropped 13 days in the transition, no matter what day in April we chose to be the transition day.  In other words, the date following our transition day would have had to have been 13 days later than what it would have been otherwise, in this case, April (15+13)th = April 28th, in effect, dropping 13 days from the calendar.

If the GregDiff value is negative, then why are 13 days being added rather than subtracted?

Because, adding 13 days to the current date is in effect, the same as jumping forward +13 days or taking away (-13) days from the calendar.

In PHP code, the above algorithm could be expressed as
 $u = floor(((($year < 0)? $year+1 : $year) - floor((14-$month)/12)) / 100);
 $GregDiff =  floor($u/4) - $u + 2;
Jay Tanner - 2022