Saturday, May 23, 2015

Finding day for a given date - part-3 (leap year)

Leap years

Feb normally  has 28 days but every 4 years we get leap year and Feb has 29 days.
Year 2004, 2008, 2012 and so on are leap years.

But there is an exception to this and century years are not
Thus year 1700, 1800, 1900, 2100, 2200,2300 are not leap years.

There are exception to this exception and every 4th century is a leap year ( Year divide by 400)
Thus year 1600, 2000 & 2400 are leap years.

Remember for leap years we need to subtract 1 from year factor for month of Jan & Feb.


Tips for simplifying calculations.

We can simplifying the calculation is by dividing the individual number by 7 and adding the remainders. So to compute year code for 2053 we can first divide 53 by 7 and we get remainder as 4, the we can find leap years which is 53/4 and quotient is  13 for year 2053 and 13/6 we get remainder as 6 and then we add 6+4 = 10 and we get remainder for 10/7 as 3. This way we deal with relatively smaller numbers and easier to calculate mentally.
Similarly while adding days we can divide by 7 and carry remainder. So far 23 we can carry only 2

No comments:

Post a Comment