New Year Day | Non-Leap Year | Leap Year |
Sunday | A | H |
Monday | B | I |
Tuesday | C | J |
Wednesday | D | K |
Thursday | E | L |
Friday | F | M |
Saturday | G | N |
Table-1: Types of Calendars.
In the above table, we simply classify all non-leap year calendars
whose new year day falls on sunday as type-A calendars. Similarly all leap
year calendars whose new year day falls on sunday is classified as type-H
Calendars. There can't be calendar types in Julian and Gregorian Calendar
other than these 14 types. All calendars, that has been used in the past,
using at present or to be used in the future should be one of them.
Julian Calendar
In Julian Calendar any year number divisible by 4 is a leap year calendar.
A calendar repeats after every 28 years, irrespective of its type
i.e., regardles of being it a leap year or non leap year.But a non leap-year
calendar repeats 3 times in 28 years and the pattern of repeation is as
follows.
How to find types of a Julian Calendar of a year?
Let Yr be a year number in A.D, then the type of of the Julian calendar
is given by S1(t), where t=Yr%28. The symbol x%y denotes the remainder
when x is divided by y.
So, the procedure of finding the type of the Julian Calendar of a year
in A.D is as follows.
1) Find t, the remainder of the year (number), when divided by 28.
2) Find S1(t), the t-th type from the sequence S1.
Example-1. On which day, the new year fell in 1745 A.D.
in Julian Calendar?
We know Yr=1975, t=Yr%28=9. So the Calendar type of the 1745 A.D in
Julian calendar is given by S1(9), that is C. C means that new year 1745
fell on Tuesday.
Thus we can find easily the new year day of any year in A.D in Julian
Calendar.
Relation Between months:
Once you know the new year day of a year, you will be able to find the day of any particular date in the year as usual. But a new and easy way of finding the day of a particular date is introduced here. We define two sequences known as Month Key values; one for non-leap year and the other for leap year.
Month Key Values (Non-Leap Year)
Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
0 | 3 | 3 | 6 | 1 | 4 | 6 | 2 | 5 | 0 | 3 | 5 |
Month Key Values (Leap Year)
Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
0 | 3 | 4 | 0 | 2 | 5 | 0 | 3 | 6 | 1 | 4 | 6 |
For a Non-Leap Year | Beginning on | For a Leap Year |
Jan,Oct | 1st January | Jan, Jul, Apr |
May | 2nd January | October |
August | 3rd January | May |
Feb, Mar, Nov | 4th January | Feb, Aug |
June | 5th January | March, Nov |
Sep, Dec | 6th January | June |
Apr, Jul | &th January | Sep, Dec |
How to find the day of a particular date in Julian Calendar?
For finding the day of a particular date in the year, the month key
value of the corresponding month is added to the given date and the remainder
of 7 is found out. Then the day is found out by counting the the days from
the new year day of the year.
Let D-M-Yr be the Date-Month-Year representation of a particular date
and K be the month key value of the corresponding month M. Then, the day
corresponding to the date D-M-Yr is the I-th day, counting from the new-year
day of the year.
where I=(D+K)%7.
In case I=0, it is the previous day of the 1st January of the year.
So for finding the day of a particular date, we have to know two things:
1) New-year day of the year and 2) the month key value.
Example-2: Find the day corresponding to 14 July 1745 in Julian Calendar.
We know, from example-1, that the new year day of 1745 fell on Tuesday.
Since 1945 is a non-leap year, the month key value of July is 6, i.e.,
K=6. Then we find I=(14+6)%7=6. Begining counting from Tuesday, the sixth
day is Sunday. That is, 14 July 1745 was Sunday.
Thus we can easily find the day of any date in Julian Calendar.
Gregorian Calendar:
In Gregorian Calendar, a year has around 365.2425 days. So, the concept
every year (number) divisible by 4 is a leap year is wrong in Gregorian
Calendar and hence a slight modification is required. For the modification
to take place, let us define a century year. A century year is a year,
whose year number can be expressed as a multiple of 100. For example, the
years 200, 800, 1700, A.D etc are century years. Leap year modification
is done on the century years in gregorian calendars. In Gregorian calendar,
any non-century year whose year number is divisible by 4 or any century
year whose year number is divisible by 400 is a leap year. Because of this
modification, we cannot form a continuous sequence of calendar types with
period 28 as in Julian Calendar. If we form a sequence of calendar types
in Gregorian calendar, it exhibits discontinuty when for each change in
century. But within a century, it has the periodicity of 28. In general
a Gregorian Calendar has periodicity of 400. In 400 years, we have 4 centuries,
hence to know sequences of Gregorian calendars, we define four modes
correponding to each century.
A mode m of a year Yr in Gregorian calendar is defined as m=q%4 where
q is the quotient when Yr is divided by 100.
Thus we have four modes, mode-0, mode-1, mode-2 and mode-3 corresponding
to the four possible values of m. Every mode has its corresonding sequence
with period 28 within a century. The sequnece of one mode can be obtained
from the sequence of other mode. The mode-0 sequence is given by
S0=[B,C,D,L,G,A,B,J,E,F,G,H,C,D,E,M,A,B,C,K.F,G,A,I,D,E,F,N]
The sequence of other modes can be found from the mode-0 sequence from
the following relation.
Sm(n)=S0(P)
where P=(n+4m)%28. Value of m are 0,1,2,and 3.
For example, if m=1, then we get S1 from S0 from the above relations.
S1=[G,A,B,J,E,F,G,H,C,D,E,M,A,B,C,K,F,G,A,I,D,E,F,N,B,C,D]
This is the sequence used in the Julian Calendar. Note that,
there is no need of defining mode in Julian Calendar.
Now we can find the Gregorian Calendar type of any non-century year
in A.D.
Procedure for finding the type of a non-century year in Gregorian
calendar:
1. Find the quotient q and the remainder r when the year Yr is divided
by 100.
2. Find m=q%4 and n=r%28
3. If m=0, then find S0(n) will give the type of the calendar.
4. If m is not equal to 0, find P=(n+4m)%28, S0(P) will give the type
of the calendar.
Example-3:
What was the Calendar type of 1876? i.e, on which day new year of 1876
fell?
Step-1: We find q=18, r=78.
Step-2: We get, m=18%4=2, and r=76%28=22
Step-3: m is not equal 0, hence P is calculated as P=(22+8)%22=2
S0(P)=S0(2)=C.
That is the type of the calendar is C. That is, the the new year of
the 1876 was Tuesday.
How to find the Calendar type of a century year in GregorianCalendar?
In Gregorian Calendar, the type of the century year has to be determined
separately because all century years are not leap year. The following table
gives the type of the calendars of each century year corresponding to the
four modes.
Mode of century year | Calendar Types |
0 | N |
1 | F |
2 | D |
3 | C |
Let S=[2 3 4 5 7 1 2 3 5 6 7 1 3 4 5 6 1 2 3 4 6 7 1 2
4 5 6 7]
Julian Calendar
I=(Date+S((Year%28+4)%7)+KeyValue(Month)-1)%7
Gregorian Calendar
For Century Years
C=[7 6 4 3]
I=(Date+C((Year/100)%4+1)+KeyValue(Month)-1)%7
For Non-Century Years
I=(Date+S(((Year%100)%28 +4*Mode)%7)+KeyValue(Month)-1)%7
Then Find the Day According to the Following Table
I=1 | I=2 | I=3 | I=4 | I=5 | I=6 | I=0 |
Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
I hope, from the above examples and formulas, one will be able to Decipher the Day of any given date (of any year in A.D) in both Julian and Gregorian Calendar easily. This theory of making Infinity Calendar can also be extended for any other types of Calendars.
Simplest The Best Algorithm for Finding the Day corresponding to a Date in Julian or Gregorian Calendar.
Any comment or criticism is always welcome. Feel free to ask me if you have any doubt. Also any body who is interested to have a copy of INFINITY CALENAR (JULIAN & GREGORIAN) can cantact me. My email: kiranisingh@hotmail.com