Sei sulla pagina 1di 2

Find the day on any date of current year I have come across a very simple way to find the

day of the week for any date of the current year. This idea is so easy, that most of you will wonder why you didn't think of it yourselves. Simple Day Calculation Trick All you have to do is........memorize this twelve digit number: 3774,2641,5375 Once you have memorized the number, you can tell the day of the week for any date of the year 2010. Each digit in the number represents the first Sunday of the month for one of the twelve months! The first Sunday in January falls on the 3rd of January; the first Sunday in February falls on the 7th of February; the first Sunday in March is the 7th of March; April 4th is the first Sunday in April; May 2nd is the first Sunday in May, and so on. So now you know the day of the month upon which the first Sunday falls for each month. How can this help you to know the day of the week for any date of the current year? Say I have to impress my wife by telling her the day of the week on her birthday this year - August 22nd, 2010you know that the first Sunday of August is the 1st of the month. Knowing this, your calculations are elementary. If the 1st is a Sunday, then the next Sunday is the 8th and the following Sunday, the 15th. The 22nd is a Sunday. Similarly 25 August 2010 will be a Wednesday.

Day on any date in the Calender


Zeller's Rule : With this technique named after its founder Zeller, you can solve any 'Dates and Calendars' problems. Zellers rule can be used to find the day on any particular date in the calendar in the history. All you have to know is the formula given below and how to use it. Zeller's Rule Formula: F = K + [(13xM - 1)/5] + D + [D/4] + [C/4] - 2C K = Date => for 25/3/2009, we take 25 In Zellers rule months start from march. M = Month no. => Starts from March. March = 1, April = 2, May = 3 Nov. = 9, Dec = 10, Jan = 11 Feb. = 12

D = Last two digits of the year => for 2009 = 09 C = The first two digits of century => for 2009 = 20 Example: 25/03/2009 F = 25 + [{(13 x1)- 1}/5] + 09 + 09/4 + 20/4 - (2 x 20) = 25 + 12/5 + 09 + 09/4 + 20/4 - 2x20 =25+2+09+2+5-40 [ We will just consider the integral value and ignore the value after decimal] = 43 - 40 = Replace the number with the day using the information given below. 1 = Monday 2 = Tuesday 3 = Wednesday 4 = Thursday 5 = Friday 6 = Saturday 7 = Sunday So it's Wednesday on 25th march, 2009. If the number is more than 7, divide the no. by 7. The remainder will give you the day. I shall be very grateful if anyone of you can provide me the java script for this formula, so that I can post it here for everyone's convenience.

Potrebbero piacerti anche