Leap year | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Leap year

Why we always have to modulus the leap year by 100 and 400

7th Jun 2018, 4:08 AM
Aveek Bhattacharyya
Aveek Bhattacharyya - avatar
1 Answer
+ 3
It is basically due to some mathematical calculations. IN DETAIL: There is a leap year every year whose number is perfectly divisible by four - except for years which are both divisible by 100 and not divisible by 400. The second part of the rule effects century years. For example; the century years 1600 and 2000 are leap years, but the century years 1700, 1800, and 1900 are not.
7th Jun 2018, 4:16 AM
Sakaar Sen
Sakaar Sen - avatar