How I made the formula:-

 

        The holidays after my 8th Standard, I was totally interested in simplifying calendars. I already found out the way to check the weekday using the month codes instead of finding coincidence of months and days. But that is not at all sufficient as no one could never know the weekday of the January 1st of that year without looking into the table-1 of years which was very much necessary to calculate the weekday of any date in any year. Calculation of this weekday became the most important task that I got to do in my summer holidays without much delay. But I also learnt one most important thing. The years 1900, 2100, 2200, 2300, 2500 etc i.e. the century years which are not divisible by 400 are not leap years. That was a very big disappointment for me as I had to change the table-1 and if it does not go symmetrical it will be too tough for me to solve the problem. When I started to calculate the weekdays of several years using this fact then to my surprise I found that the table even got reduced by 3 columns as now one had to divide by 4 instead of 7. It was because in the previous table there was a symmetry that was established only after every 700 years where as after correction there was a symmetry that was established for every 400 years.

Here’s how it works,

Previously it was

1900 – Monday

2000 – Saturday

2100 – Sunday

2200 – Monday ……… and so on (repeats after every 700 years)

But now it is

1900 – Monday

2000 – Saturday

2100 – Friday

2200 – Wednesday

 And then again

2300 – Monday

2400 – Saturday

2500 – Friday

2600 – Wednesday ……… and so on (repeats after every 400 years)

 

Any century year can never be a Tuesday, Thursday or a Sunday (it has its own limitations), it can only be a Monday, Saturday, Friday or a Wednesday.

That made me very happy in the sense that I could at least reduce the number of columns by 3 and also that the symmetry was found at the end of every 400 years so that now instead of dividing by 7 we need to only divide only by 4 which is quite simple.

But what about finding out the weekday of any year’s January 1st which still remains a big ?

The difference between two consecutive years’ weekdays was always one weekday. For example, the weekday of October 15th of 1997 is Wednesday. So the weekday of October 15th of 1998 is Thursday & 1999 is Friday but that of 2000 is a Sunday. Every year has generally, 365 days and 52 weeks but 52*7 is 364.So every year one weekday remains. But in the case of a leap year the year has 366 days and two weekdays remain. The weekday of the January 1st of any year depends on the weekday of the January 1st of the century year. The weekday of January 1st of 1900 is Monday. The weekday of January 1st of 1984 depends on the number of days between 1900 to1984. And this is equal to the no of years from 1900 to1984 times 365 + the no of leap years (This is because 1 day comes extra in a leap year). When the sum is obtained let it be divided by 7 and the remainder obtained gives you the no of weekdays you ought to add to the weekday of January1st of 1900 to get the weekday of the January 1st of the required year or1984. But it is very difficult each time to multiply with 365 and it is not important also to do it. Ultimately we are dividing it with 7 and 365 is 52 times 7 plus 1 so you can multiply the number of years with 1 and then add the number of leap years and also add the number corresponding to the weekday of the century year. So at last I did it I thought but how to put all this in a nice tabular form and merge it with the previous tables of the months and the dates. Anyway I already used 0 for Sunday, 1 for Monday, 2 for Tuesday, etc. So I decided to use the same codes for weekdays of the January 1st of the century years.

 

 

Code for 2000 was 6

Code for 2100 was 5

Code for 2200 was 3

Code for 2300 was 1

Code for 2400 was 6

Code for 2500 was 5

 And so on….

But I had to modify it a little due to a small error that crept in. When we are adding the number of years and the number of leap years to the century year’s weekday, if the century year is leap year we are missing to add the extra day that has come in the century year itself which is why the above code for 2000, 2400, 2800, 3200 etc are likely to show errors, and it has to be modified as

Code for 2000 was 6 or 0

Code for 2100 was 5

Code for 2200 was 3

Code for 2300 was 1

Code for 2400 was 6 or 0

Code for 2500 was 5

 And so on….

Finally,

For the century code: -Divide the first two digits of the year by 4 and according to the remainder see the corresponding century code.

Note:-If the remainder is 0 & year is a century year then the century code must be taken as 6.If the remainder is 0 & the year is not a century year, then the century code must be taken as 0.

That is for example for the year 2000 century code is 6 and for the year 2008 century code is 0.So at last I fixed a big bug in my calendar which made it most accurate and simpler.

Then I merged it with my previous month codes which existed when I did my calendars in the form  of tables and checked for  accuracy in different centuries.

 

This way my method for weekday calculation in any year was totally completed.

 

This is a part of my Home Site exclusively dedicated to my work in calendars. All pages are best viewed in IE 5.5+ @ 800x600 resolution with speakers on.

Hosted by www.Geocities.ws