Leap Year Definition:
"A leap year is a year containing one extra day in order to keep the calendar year synchronized with the astronomical or seasonal year."So, a leap year in the Gregorian calender has 366 days where as a normal year has 365 days. The extra day is added in the month of February making it 29 days.
The Next Leap Year:
The next leap year is in current year 2012 and hence, February 2012 has 29 days.Leap Year Algorithm:
Here is the Pseudocode from Wikipedia to determine whether a year is a leap year or not in either the Gregorian calendar since 1582 or in the proleptic Gregorian calendar before 1582:if year modulo 4 is 0
then
if year modulo 100 is 0
then
if year modulo 400 is 0
then
is_leap_year
else
not_leap_year
else is_leap_year
else not_leap_year
Leap Year Calculator:
Enter the year you wish to check
No comments:
Post a Comment
Please give your feedback, questions and suggestions. I will surely answer you.