The Year Code
To calculate the Year Code, use this formula:
(YY + (YY div 4)) mod 7
YY is the last two digits of the year. For the year 1897, it’s 97.
First, divide YY by 4 and discard the remainder: 97 div 4 = 24.
Then add 24 back into the YY number, which is 97 in this case, resulting in 121.
The next step is: 121 mod 7.
The Month Code
This is easy — just memorize the number 033614625035:
January = 0
February = 3
March = 3
April = 6
May = 1
June = 4
July = 6
August = 2
September = 5
October = 0
November = 3
December = 5
For the Gregorian Calendar, remember the number 4206420:
1700s = 4
1800s = 2
1900s = 0
2000s = 6
2100s = 4
2200s = 2
2300s = 0
Leap Year Code
The other thing to take into account is whether you are dealing with a leap year. EDIT: If the date is in a January or February of a leap year, you have to subtract one from your total before the final step.
Gregorian Calendar
If you can divide a Gregorian year by 4, it’s a leap year, unless it’s divisible by 100. But it is a leap year if it’s divisible by 400.
1992 is a leap year because you can divide it by four.
1900 is not a leap year because you can divide it by 100.
2000 is a leap year because you can divide it by 400.
Let us calculate the number of odd days between these two dates. July month of 1984 has 29 days left. So odd days are 1. Now august 1984 to June 1985 we have 3 + 2 + 3 + 2 + 3 + 2 + 0 + 3 + 2 + 3 + 2. Now July, 1985 till 2nd July contains 2 odd days. Total 29 odd days. or 1 odd day. So July 2, 1984 is 1 day before Wednesday. It is Tuesday.
(2nd July 1985 is in fact Tuesday, and 2nd July 1984 is Monday)
Muze question ki preparation karana hai
Midcpeon and helper question prepare
How
it was Monday. So, you can use this formula to solve the question The formula is:
(Year Code + Month Code + Century Code + Date Number – Leap Year Code) mod 7
what are the codes ???
The Year Code
To calculate the Year Code, use this formula:
(YY + (YY div 4)) mod 7
YY is the last two digits of the year. For the year 1897, it’s 97.
First, divide YY by 4 and discard the remainder: 97 div 4 = 24.
Then add 24 back into the YY number, which is 97 in this case, resulting in 121.
The next step is: 121 mod 7.
The Month Code
This is easy — just memorize the number 033614625035:
January = 0
February = 3
March = 3
April = 6
May = 1
June = 4
July = 6
August = 2
September = 5
October = 0
November = 3
December = 5
For the Gregorian Calendar, remember the number 4206420:
1700s = 4
1800s = 2
1900s = 0
2000s = 6
2100s = 4
2200s = 2
2300s = 0
Leap Year Code
The other thing to take into account is whether you are dealing with a leap year. EDIT: If the date is in a January or February of a leap year, you have to subtract one from your total before the final step.
Gregorian Calendar
If you can divide a Gregorian year by 4, it’s a leap year, unless it’s divisible by 100. But it is a leap year if it’s divisible by 400.
1992 is a leap year because you can divide it by four.
1900 is not a leap year because you can divide it by 100.
2000 is a leap year because you can divide it by 400.
What is mod
Let us calculate the number of odd days between these two dates. July month of 1984 has 29 days left. So odd days are 1. Now august 1984 to June 1985 we have 3 + 2 + 3 + 2 + 3 + 2 + 0 + 3 + 2 + 3 + 2. Now July, 1985 till 2nd July contains 2 odd days. Total 29 odd days. or 1 odd day. So July 2, 1984 is 1 day before Wednesday. It is Tuesday.
(2nd July 1985 is in fact Tuesday, and 2nd July 1984 is Monday)