You are on page 1of 11

Bulletin of the Marathwada Mathematical Society

Vol. 12, No. 1, June 2011, Pages 65–75.

GREGORIAN CALENDAR

S.R.Joshi
8, Karmayog, Tarak Colony, Opp. to Ram-krishna Ashram,
Beed bye pass Road, Aurangabad - 431 517, M. S., India.
E-mail: pranav.coatings@gmail.com
and
U.S. Muley,
Dept.of Mathematics,
Govt. College of Arts and Science,
Aurangabad, 431001, M. S., India.

Abstract

After giving a brief history of the Gregorian calendar, a few formulae for
finding the day (Sunday to Saturday) on a given date are derived, which can
be used in obtaining the calendar of any given year. It has been shown that
these formulae remain valid up to the end of 32nd century approximately, in
the present context of the rules about deciding a leap year. A modified formula
for finding the day, which will also work after 1-1-3200 is obtained by adding
one more rule in the existing rules for deciding a leap year.

1 INTRODUCTION

The dictionary meaning of the word calendar is the table of dates, months, and
days in a given year. Different calendars are followed in different countries depend-
ing on the culture , tradition and astronomical practices of the countries [7, 8]. Even
in one country different date systems are followed in different parts of the country.
For example in India 30 different date systems are used in 30 different parts [8].
The current national calendar of India was set up in 1957 and adopted on March 22,
1957 by the Calendar Reform committee that formalized a lunar-solar calendar in
which leap years coincide with the Gregorian calendar, which is an internationally
accepted civil calendar [2]. Unfortunately this national calendar is not followed in
many parts of India. 99 percent people of India don’t know even that there is a
national calendar of their country.
In this article, we give a short history of the Gregorian calendar and explain

65
66 S.R.Joshi and U.S.Muley

how it is prepared for a given year using the formulae to be derived. Different for-
mulae are available in deciding the day for a given date. All these formulae mainly
depend on the following five things.
(i) The definition of a year (by a year we mean the tropical year or the solar year)
(ii) Every year is divided into 12 months, January to December having fixed number
of days.
(iii) The seven days of a week are repeated periodically with period 7.
(iv) The concept of the leap year, and
(v) The day on January 1, 0001.

After deriving a few formulae for finding the day for a given date, we shall
show that these formulae remain valid up to December 31, 3199 approximately. We
shall also obtain a modified formula for finding the day of a given date for which
one has to add one more rule in the existing rules for deciding a leap year.

2 HISTORY OF THE GREGORIAN CALENDAR [1,2,6,8]

The calendar that is used now a days in almost all countries over the world is
the Gregorian calendar and it is an internationally accepted civil calendar [2]. It
was introduced by Pope Gregory XIII, after whom the calendar was named.
The Gregorian calendar year differs from the solar year by 26 seconds approximately.
By a solar year we mean the number of days taken by the Earth to go round
the Sun in its elliptical orbit. This solar year is then qualified with adjectives
like ”tropical” , ”sidereal” , ”eclipse” , etc. depending on the reference point for
recknowing a revolution. For example the tropical solar year is the time interval
between two successive passages of the sun, as observed from the earth, through
the vernal equinox point on the ecliptic. For the purpose of Gregorian calendar the
length of a tropical solar year is used. The length of a tropical solar year is given
by [4, 7];

yr = 365 days, 5 hours, 48 minutes, 45.216 seconds (approximately)

i.e.
yr = 365.24219 (approximately). (2.1)
For the Hindu Sauramana calendar on which the Makar Sankranti ,Tamil new year’s
day etc are based , the sidereal solar year is used. Its length is 365.256363 days.
There is some debate among astronomers and other parties as to what actually con-
stitutes the solar year, and these figures can vary by several seconds.[7]
Before 25th March,1752, the calendar that was followed is known as Julian
calendar. There were 12 months in a year, January to December. There were 7
days in a week (Sunday to Saturday) and they were used to occur periodically as is
the case today with one exception. The exception was that a year was considered as
Gregorian Calendar 67

a leap year whenever the year number is divisible by 4 even if it is divisible by any
multiple of 100. By a leap year we mean that year in which an extra day is added
to the calendar in order to synchronize it with the seasons. Secondly every year was
used to begin on 25th March instead of 1st January. For example after March 24,
1673, the next day would be March 25, 1674, advancing the year only. Due to this,
a somewhat confusing phenomena occurred, and for the present day imaginations,
comprehension requires a close attention.
Gregorian calendar is a compilation of usages dating from the days of Julius
Caesar, when the Greek astronomer and mathematician Sosigenes devised for Rome,
a calendar, [2] only essentially familiar to us as our present day calendar. It was dur-
ing the late 16th century, that the work of the 6th century Anglosaxon monk Bede,
was submitted to Pope Gregory XIII, who accepted the calculations and made the
decision to issue a more accurate calendar which ultimately was accepted. The Gre-
gorian calendar was adopted by most Roman catholic countries. Many protestant
countries did not accept the new calendar until 18th century. Britain and America
accepted the Gregorian calendar for themselves and all their possessions were effec-
tive from March 25,1772. But a remarkable 2-step change was made which is little
realized today.
Before following the Gregorian calendar, the British made the following two
decisions in the form of a decree.[2]
(D2.1) It was decreed that year 1752 should end with December 31st and not be
carried on to the next March 25.
(D2.2) It was decreed that the arrival of September 2, 1752, should be called Septem-
ber 14, 1752.
For the sake of clarity, we explain; the period of January 1,... March 24, 1751
was the end of an epoch. The year 1752 began on March 25th and ended with De-
cember 31, 1752. The earlier days of 1752 never existed (83 days). Also the deleted
days of September, 2-13 (11 days) of 1752 never existed. Thus the year 1752 was a
very short year; 72 days shorter. Due to omission of 11 days the vernal equinox was
resorted to the 21st March.[8]
Because of the statements (D2) cited above, the day September 2, 1752 existed
(Wednesday) and this was followed by Thursday September 14, 1752 (the order of
the days was not disturbed). The 11 days from September 3 to September 13,1752
did not exist. Because of this, protestors give the slogan ”Give us back our 11 days”
even today. From astronomical and mathematical point of view this slogan given
by protestors due to blind belief has no meaning.
Of course, dates may be recomputed from the old to the new calendars. For
instance, George Washington’s birth day was February 11, 1731, as far as his mother
was concerned. Today we recon his birthday as February 21, 1732 according to Gre-
gorian calendar. In order to convert from old Julian calendar to the new Gregorian
calendar, one must add 10 to 13 days to the old date, and sometimes change the
year one extra when the date considered falls within the period January 1-March
68 S.R.Joshi and U.S.Muley

24. This is very important for those interested in genealogy and historical research.
Documented dates before March 25,1752 do not necessarily always coordinate with
a stated period of time. Further, references to any new years day before 1752, in
Great Britain meant March 25th.

3 FORMULAE FOR OBTAINING THE DAY OF A GIVEN DATE

The problem of obtaining the Gregorian calendar for a given year depends on
the problem of knowing the day of a given date. For this purpose let d-m-y be a given
date where d, m, y are all positive integers satisfying 1 ≤ d ≤ 31 and 1 ≤ m ≤ 12 , .
We shall assume that y is a 4-digit number abce,where a, b, c are nonnegative in-
tegers and e > 0. Let fr be the fractional part of the value of the year yr given by
the equation (2.1) i.e. fr = 0.24219. If k is a positive integer and x,y are any two
integers we say that x is congruent to y modulo k if the difference (x - y) is divisible
by k and express this by writing x ≡ y (mod k) . Throughout this paper we assume
k = 7. Hence for brevity by x ≡ y we mean x ≡ y (mod 7) . It is clear that if r
is the remainder when an integer n is divided by 7 then n ≡ r (mod 7) . Because
of this if a certain day occurs on a given date say dt1 and if a date dt2 occurs after
or before n days then the same day occurs on dt2, whenever n is a multiple of 7.
For simplicity we shall denote the date 1st January, 0001 by the symbol D0 . Now
the problem of finding the day on date d-m-y depends on the value of yr given by
(2.1), the day on D0 , and the number of days passed before d-m-y and up to D0 .
Note that the value of the yr is not an integer. As a first approximation we take the
value of the the yr as 365.25 i.e. 365 days and a quarter of a day. In practice we
take the value of an year as a whole number 365, and after a period of four years
we take the value of a year as 366 days calling that year as a leap year, taking 29
days in February instead of 28. Note that the value 365.25 is a little more than
the actual value of yr by an amount of df = 365.25 - yr = 0.00781(in days). This
difference may cause difficulties in counting the actual days passed after D0 . If we
multiply the difference df by 400 we get 3.124 . This means we have taken 3 days
(again approximately) more in counting the leap years within a period of 400 years.
If we neglect this difference for ever, after a long period, seasons in a year will not
take place in specified months, as we observe and experience today. To overcome
this difficulty a provision is made in the Gregorian calendar in deciding a leap year.
The present rules about leap years are as follows.
(L1) If y = abce is a year and the number ce (10c + e) is divisible by 4 and ce ̸= 0,
then the year y is supposed to be a leap year.
(L2) If ce = 0 and ab is divisible by 4 (i.e. y is divisible by 400) then also the year
is supposed to be a leap year.

For example the years 344, 2368, 1200, 2000, 2800 are all leap years. But
Gregorian Calendar 69

the years 345, 1946, 1800, 2100, are not leap years according to the rules (L1) and
(L2).
In order to find the day on D0 we shall assume that the Gregorian calendar
existed in the past years up to D0 . This assumption and the rules (L1) and (L2)
will help us to find the number of days passed from D0 to d-m-y. For this we shall
consider that date on which the day is known. For example we know that the day
on 1-1-2001 was Monday. Further it can be verified that the total number of days
passed from D0 to 1-1-2001 (including both the days) is 730485. This number is ex-
actly divisible by 7 and hence using the congruency relation modulo 7 , we conclude
that the day on D0 must be Monday. Hence the problem of finding the day on D0
is solved.
Let T be the total number of days passed from the date d-m-y to D0 . Let r be
the remainder when T is divided by 7. Clearly there are 7 values of r, 0 to 6. From
these values of r and because the day on D0 is Monday, the day on d-m-y is decided
from the following table.
T able 3.1
Remainder r 0 1 2 3 4 5 6
Day Sun Mon Tue Wed Thu Fri Sat
Note that if T is replaced by T - 7n, where n is any integer, then the same
remainders are obtained when T - 7n is divided by 7 as are obtained for T.
In practice it is not convenient to find the value of T and then decide the day
on d-m-y, sice it takes time for calculation. There are shortcuts to decide the day.
These are discussed below in the form of formulae.

Formula 3.1 :Every non-leap year contains 365 days and 364 ≡ 0 . Hence if
a particular day occurs on 1st January of such a year, then the next day occurs on
1st January of the next year. For example the day on 1-1-2010 was Friday and the
day on 1-1-2011 was Saturday. Hence as far as the calculation of a day is concerned,
advancing a non-leap year is equivalent to advancing a day, because

365 ≡ 1 (mod 7). (3.1)


Similarly advancing a leap year is equivalent to advancing two days, since

366 ≡ 2 (mod 7). (3.2)


Now for the date d-m-y, the number of complete years passed from this date
to D0 is (y-1). Among these years some years are leap, obtained by the rules (L1)
and (L2) mentioned earlier. If l is the number of leap years passed, then it can be
observed that
l = [y/4] − [3(ab + 1)/4]. (3.3)
where by [x] we mean the integer part of the real number x . Note that in a period
of 400 years there are [400/4] - 3 i.e. 97 leap years and not 400, because of the rules
70 S.R.Joshi and U.S.Muley

(L1) and (L2). Hence if there are d1 number of days passed before 1st January,y, to
D0 , then by using (3.1), (3.2) and (3.3) we get

d1 ≡ (y − 1) + [y/4] − [3(ab + 1)/4] . (3.4)

Let d2 be the number of days from 1st January, y , to d-m-y and d3 be the number
of days from 1st January, y to the end of (m-1)th month of the year y. Then clearly

d2 = d + d3 . (3.5)

Note that d3 is 0 if the month number m is 1 (for January). There are 12 values
of d3 and these are fixed since the days of months are fixed. These 12 numbers are
0,31,59 (31+28),90 (31+28+31), 120, 151, 182, 212, 243, 273, 304, and 334. It is
sufficient to take the remainders of these numbers after dividing by 7, since days are
repeated periodically. It is observed that the remainders are 0,3,3,6,1,4,2,5,0,3,and
5 respectively. We shall denote these remainders by the symbol cm and call them
as month codes. These are given in the following table.

T able 3.2

Month Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
cm 0 3 3 6 1 4 6 2 5 0 3 5
Note that we have supposed that there are 28 days in February whether the year y is
leap or not leap. Further d3 is congruent to one of these 12 month codes depending
on the value of m i.e.
d3 ≡ cm (3.6)
Now
T ≡ d1 + d2 ≡ d1 + d + d3 . Hence using (3.4) and (3.6), we get

T ≡ d + cm + (y − 1) + [y/4] − [3(ab + 1)/4] (3.7)

The formula (3.7) for finding the day on d-m-y is valid for all dates except when y
is a leap year and when the month is January (m = 1) or February (m = 2). This is
so because the 12 month codes given in Table 3.1 are obtained by taking 28 days of
February irrespective of the nature of the year. For this exceptional case the number
1 is to be subtracted from the right hand side of the equation (3.7) and calculations
are to be carried out. The formula (3.7) can be verified for any date from D0 to
31st December 3199. We shall explain the reason for this after discussing two more
formulae for finding the day on a given date.

Formula 3.2 :The formula (3.7) can be modified further so that it will take less
time in finding the day on a given date d-m-y. According to the rules (L1) and
(L2) about the leap years there are 97 leap years in a period of 400 years. Also
Gregorian Calendar 71

an advancement of one non-leap year is equivalent to advancing a day. Hence in


a period of 400 years the total days advanced is equal to 497. This number is ex-
actly divisible by 7. Hence after every gap of 400 years the days are repeated in
the same order. For example if the day on 15th August, 1547 is Friday, then, the
day on 15th August 1947 or 2347 is also Friday. This fact can be verified for any
two dates differing by 400 years with the help of the formula (3.7). Note that we
have assumed that the Gregorian calendar existed in the past years also up to D0 .
Hence for a given date d-m-y if the corresponding year number > 400, then it can
be reduced by subtracting a suitable multiple of 400 from the number y. So there
is no loss of generality if we assume that y < 400. Let y = abce, with a = 0. With
this assumption we have ab = b, y = 100b + ce, [y/4] = 25b + [ce/4] and [3(ab
+ 1)/4] = [3(b+1)/4]. Note that there are only 4 possible values of b viz 0,1,2 and
3, which decide the dates in the first, second, third and fourth century respectively.
With these changes the formula (3.7) can be written in the form,

T ≡ x1 + x2 , (3.8)

where
x1 = d + cm + ce + [ce/4], and x2 = 125b − 1 − [3(b + 1)/4]. (3.9)
Since x2 depends on b and b has only 4 values (0,1,2,3), x2 has 4 values viz -
1, 123, 247 and 371 respectively. These four numbers are congruent to 6,4,2 and 0
respectively modulo 7. We shall call these 4 numbers as century codes and we denote
them by a common variable say c0 . These four code numbers are corresponding to
the 4 values of b (0,1,2,3) which are also the remainders when the century part ab of
y is divided by 4 even if a is nonzero. The four values of c0 are given in the following
table.
T able3
Remainder 0 1 2 3
Code c0 6 4 2 0

Note that x2 ≡ c0 . Hence using (3.8) and (3.9), we get from (3.7)

T ≡ d + cm + ce + [ce/4] + c0 (3.10)

This is the second formula for deciding the day on a given date. This formula is
much more simpler than the Formula 3.1 from calculation point of view. It does
not require any kind of calculator. Only thing is that one has to remember the 12
month codes (values of cm) given in Table 3.2 and the century codes c0 given in
Table 3.2 Further as in case of Formula 1, here also, one has to subtract 1 from the
right hand side of (3.10) when one wants to find the day on a date which falls in
January or February and when the year y is a leap year. Readers may verify the
validity of the formula by considering any date for which the corresponding day is
known.
72 S.R.Joshi and U.S.Muley

Formula 3.3: In [7] on page 264 the following formula is given to find the day
on a given date.

T ≡ d + [2.6M − 0.2] + ce + [ce/4] + [ab/4] − 2ab − (1 + L)[M/11](mod 7), (3.11)

where M is the month number beginning with March and not with January and the
values of M (beginning with March and ending with February) are 1,2,3,... ,12, and
L is 1 or 0 according as the year y = abce is leap or not. In [7] it is also said that this
formula does not work before the year 1582, in the sense that the days obtained by
this formula and the those obtained by using old calendars do not always coincide.
Though the derivation of this formula is not given in [7](authors of this paper don’t
know the derivation part), it can be verified that the formula gives the same results
as obtained by Formulae 3.1 and 3.2.

4 MODIFIED FORMULA

As remarked at the end of Formula 1, the Formulae 2 and 3 also do not remain
valid after 32th century. This is due to the assumption that there are only 97 leap
years in a period of 400 years. The difference of 3 years (400/4 - 97) is obtained by
considering the product 400(365.25 - yr) = 3.124, where yr is the value of a year
given by the relation (2.1). This product is greater than 3 by the amount 0.124 . If
we consider a period of 3200 years( more approximate period is 3300 years ) then
according to our assumptions there are 97 × 8 i.e. 776 leap years. But if we
multiply the difference (365.25 - yr) by 3200 we get 24.992 which is approximately
equal to 25. This means there are 3200/4 - 25 i.e. 775 leap years instead of 776.
Thus according to the value of yr and the present rules (L1) and (L2) about the
leap years we are taking one extra leap year in a period of 3200 years. This further
implies that there will be 100 extra leap years in a period of 320000 years. This will
create difficulties in experiencing seasons, in the sense that seasons will not occur in
specified months as we observe today. Of course this situation will start occurring
after 1-1-3200 slowly as centuries will pass. To overcome this difficulty the rulers of
different nations all over the world will have to take help from mathematicians and
astronomers to add the following rule about leap years.

(L3) If y is a multiple of 3200, then y is supposed to be a non-leap year, though y


is divisible by 400.
The problem of deciding the rules about leap years can also be handled by con-
sidering the convergents of the rational number yr expressed as a continued fraction
[7]. On pages 138-140 the authors of [5] have considered the value of yr as yr = 365
days 20926 seconds (this value differs from the value given by (2.1) by just 0.784
Gregorian Calendar 73

20926
seconds ) i.e. yr = 365 86400 This yr can also be expressed as a continued fraction.
It is yr = (365; 4, 7, 1, 3, 5, 64). The consecutive convergents are given by

p0
q0 = 365, pq11 = (365, 4) = 365 days 6 hours, pq22 = (365; 4,7) = 365 days 5 hours 47
minutes and 35 seconds, pq33 = [365; 4, 7, 1] = 365 days 5 hours 49 minutes and 45
seconds etc.It can be observed that pq00 , pq22 , pq44 are the lower approximates to the
actual values of the yr and the errors are 5 hours 48 min 46 sec, 1 min 11 sec and
1 sec respectively. The errors go on decreasing and if yr = pq44 approximately then,
the error is just 1 second. Further the convergents pq11 , pq33 are upper approximates
to yr. The errors are 11 min 14 sec and 19 sec respectively. Here also the errors
are decreasing. For practical purposes one year = 365 days i.e. pq00 . Clearly this is
much lower estimate than the exact value of yr. If we take yr = pq11 then we have to
account for 6 hours time each year. In four years the error accounted is 24 hours.
Hence to compensate this error it is a practice to add one day to every 4th year and
call it a leap year. If yr = pq22 approximately, we again commit an upward mistake
of 11 min. 14 sec. each year. In a century the accumulated mistake is 18 hours
43 min 20 sec. To compensate this error we take every 4th century as a leap year.
The story does not end here since there is a mistake of 2 hour 53 min. 20 sec. in
every 400 years. To compensate this mistake every 32nd century is to be exempted
from leap year. For more details about convergents related to leap years readers
may refer [5].
It is clear that the rule (L3) is applicable only when y ≥ 3200. The rule
(L3) along with (L1) and (L2) can be used to obtain the following modified formula
for deciding the day on a given date and which will hold up to 1-1-320000 approxi-
mately.
Let d-m-y be a given date, where y = pqabce is a six digit number. Let c1 =
[pqab/32]. Then the number c1 indicates the number of leap years to be subtracted
according the rule (L3). Hence the equation (3.11) is changed as

T ≡ d + cm + ce + [ce/4] + c0 − c1 (4.1)

This is an extended formula which can be used to find the day on any date d-m-y
up to 1-1-320000 and the Formula 2 is a particular case in the sense that it coincides
with Formula 3 whenever y ≤ 3200. Lastly we give below an algorithm depending
on the modified formula for deciding the day on a given date d-m-y.

Algorithm (1) Input the date in the form d-m-y ,where y = pqabce, so that d,m,y
are all positive integers.
(2) If y ¿ 320000 then goto (14)
(3) If d ≤ 0 or d ̸= [d] or m ≤ 0 or m ̸= [m] or y ≤ 0 or y ̸= [y] then print
” date inserted is invalid”. Go to (1).
(4) If m = 1,2,3,....12, then let cm = 0,3,3,6,1,4,6,2,5,0,3,5 respectively.
(5) y1 = 100 × [y/100 − [y/100]] and y2 = [y1 /4].
74 S.R.Joshi and U.S.Muley

(6) r = pqab - 4 [pqab/4]


(7) c1 = [pqab/32].
(8) If r = 0, 1, 2 or 3 then c0 = 6, 4, 2 or 0.
(9) T = d + cm + y − 1 + y2 + c0 − c1
(10) days = T - 7 [T/7].
(11) If y is a leap year and m = 1 or 2, then days = days -1.
(12) If days = 0,1,2,...,6, then DAY = Sunday, Monday, ...,Saturday respectively.
(13) Print the day on d-m-y is DAY.
(14) Print ” the day on d-m-y can not be obtained since y ¿ 320000.
(15) End.

5 CONCLUDING REMARKS

We have obtained a formula for finding the day on a given date which holds true up
to 1-1-320000. Note that the number 320000 we have considered in the derivation of
Modified Formula is chosen for practical purpose in order to handle the Rule (L3)
as it has been done for handling the rules (L1) and (L2). An integer near to 320000
but greater than 320000 can also be considered. But the rule (L3) will become
unpracticable to handle. Further one can not obtain a universal formula for finding
the day on any given date. This is so because the value of yr given by (2.2) is not
exact. In fact yr is an irrational number since the length of an ellipse depends on π ,
an irrational number. Hence there is no end to the extension of any modified formula.

ACKNOWLEDGEMENT The authors are very much thankful to Dr. S. Balchan-


dra Rao, Hon. Director, Bharatiya vidya Bhavan’s Gandhi Centre of Science and
Human Values, Bangalore, for providing useful information in the preparation of
this article.

References
[1] The New Caxton Encyclopedia, International Learning Systems
Corp.(Athens,NewYork),(1969)

[2] Lawrence A. Crowl , The British Switch to the Gregorian Calendar,


crowl@cs.orst.edu,(October 4,1955)

[3] Subhamoy Das, The Hindu Calendar System,About.comGuide, Google


Search, 18-10-2010.

[4] Sudhir Date, Anantkalin Dindarshika (Marathi), Sakal-Daily, Maharatra, In-


dia, (6-7-2003).
Gregorian Calendar 75

[5] S.G. Deo, D.Y.Kasture, H.V. Kumbhojkar and V.G.Tikeker, Popular


Lectures on Mathematics, Universities Press(India), Pvt. Ltd.(2009).

[6] Google Search, hinduism .about.com/od/history/a/calendar.htm,18-10-2010.

[7] Ivan Niven and Herbert S. Zuckerman, Wiley Eastern Limited ,(1976).

[8] Robert Wilde, Introduction of the Gregorian Calendar, About.comGuide,


Google Search, 18-10-2010.

You might also like