Conversion between the Julian and Gregorian calendar

from Wikipedia, the free encyclopedia

Simple counting

March 1900 calendar sheet
Calendar sheet February 1900

In order to get from a starting date in the Julian calendar to the corresponding date in the Gregorian calendar, the following must be added:

  • 10 days from October 5, 1582 Jul. / October 15, 1582 greg. until February 18, 1700 jul. / February 28, 1700 greg.
  • 11 days from February 19, 1700 Jul. / March 1, 1700 greg. until February 17, 1800 jul. / February 28, 1800 greg.
  • 12 days from February 18, 1800 jul. / March 1, 1800 greg. until February 16, 1900 Jul. / February 28, 1900 greg.
  • 13 days from February 17, 1900 Jul. / March 1, 1900 greg. until February 15th 2100 jul. / February 28th 2100 greg.

In the years in which only the Julian calendar assumes a leap year, i.e. 1700, 1800, 1900, 2100, February 29 must always be counted. Conversely, to get from a Gregorian date to the date in the Julian calendar, the specified number of days must be counted back.

Math solution

The date is given in the form YMT (year-month-day). The conversion between the Julian and Gregorian calendar takes place in three steps:

  • Calculation of the daily difference
  • Addition / subtraction of the daily difference
  • Correction of the date

Calculation of the daily difference

First you divide J by 100 to get the (integer!) Century number (e.g. for the year 1960 → JH = 19). For the months of January and February (M ≤ 2), the year J must be reduced by one before the calculation of JH (JH = whole number result of ((J-1) / 100)).

Then one computes a (integer!) As:

 a = JH/4

and

 b als Rest dieser Division.

The daily difference then results from the formula:

 TD = 3*a + b - 2

Written down mathematically correctly this is:

Addition / subtraction of the daily difference

When converting Gregorian → Julian , the daily difference is subtracted:

   T = T - TD

When converting Julian → Gregorian , the daily difference is added:

   T = T + TD

Correction of the date

Gregorian → Julian:

  • By subtracting the daily difference, the converted day can be less than or equal to 0. In this case the length of the previous month is added and the previous month becomes the new month.
  • When the year changes, the year must be reduced by 1.
  • The Julian leap year rule applies to the length of February.

Julian → Gregorian:

  • By adding the daily difference, the converted day can be greater than the length of the month. In this case the month length is subtracted and the following month becomes the new month.
  • When the year changes, the year number must be increased by 1.
  • The Gregorian leap year rule applies to the length of February.

Examples

Gregorian → Julian

 8. Januar 1621 GK: JH   = 1620/100 = 16 (Jahreszahl um 1 vermindern, da Monat Januar)
                JH/4 = 4 Rest 0
                TD   = 3*4 + 0 - 2 = 10
                T    = 8 - 10 = -2  (kleiner Null; daher Monatskorrektur)
                M    = 12           (Monatsübergang)
                J    = 1620         (Jahresübergang)
                T    = -2 + 31 = 29 (Länge des Vormonats 31 Tage)
 → 29. Dezember 1620 JK
 1. März 1700   GK: JH   = 1700/100 = 17
                JH/4 = 4 Rest 1
                TD   = 3*4 + 1 - 2 = 11
                T    = 1 - 11 = -10  (kleiner Null; daher Monatskorrektur)
                M    = 2             (Monatsübergang)
                T    = -10 + 29 = 19 (Länge des Vormonats 29 Tage; julianische Schaltjahresregel)
 → 19. Februar 1700 JK
 10. Januar 1900 GK: JH   = 1899/100 = 18 (Jahreszahl um 1 vermindern, da Monat Januar)
                JH/4 = 4 Rest 2
                TD   = 3*4 + 2 - 2 = 12
                T    = 10 - 12 = -2  (kleiner Null; daher Monatskorrektur)
                M    = 12            (Monatsübergang)
                J    = 1899          (Jahresübergang)
                T    = -2 + 31 = 29  (Länge des Vormonats 31 Tage)
 → 29. Dezember 1899 JK
Illustrative Gregorian calendar
Calendar from October 15, 1582

Julian → Gregorian

 29. Dezember 1620 JK: JH   = 1620/100 = 16
                JH/4 = 4 Rest 0
                TD   = 3*4 + 0 - 2 = 10
                T    = 29 + 10 = 39 (größer als Monatslänge; daher Monatskorrektur)
                T    = 39 - 31 = 8  (Länge des Monats 31 Tage)
                M    = 1            (Monatsübergang)
                J    = 1621         (Jahresübergang)
 → 8. Januar 1621 GK
 19. Februar 1700 JK: JH   = 1699/100 = 16 (Jahreszahl um 1 vermindern, da Monat Februar)
                JH/4 = 4 Rest 0
                TD   = 3*4 + 0 - 2 = 10
                T    = 19 + 10 = 29  (größer als Monatslänge; daher Monatskorrektur)
                T    = 29 - 28 = 1   (Länge des Monats 28 Tage; gregorianische Schaltjahresregel)
                M    = 3             (Monatsübergang)
 → 1. März 1700 GK
 29. Dezember 1899 JK: JH   = 1899/100 = 18
                JH/4 = 4 Rest 2
                TD   = 3*4 + 2 - 2 = 12
                T    = 29 + 12 = 41  (größer als Monatslänge; daher Monatskorrektur)
                T    = 41 - 31 = 10  (Länge des Monats 31 Tage)
                M    = 1             (Monatsübergang)
                J    = 1900          (Jahresübergang)
 → 10. Januar 1900 GK
Illustrative Julian calendar
Calendar from January 1st of year 1 (the correction from August up to year 8 is not taken into account )

Web links

Commons : Perpetual calendars  - collection of images, videos and audio files
  • Online calendar calculator (Waybackmachine version from July 19, 2016, 03:28:28)