Subscribe this Blog

Enter your email address:

Delivered by FeedBurner


Tuesday, February 28, 2012

Is 2012 a Leap Year or Not?

What is Leap Year ?
Is it the year with Feb 29 ?
We can see what Wikipedia says about leap year
February 29 is a date that usually occurs every four years, and is called leap day. This day is added to the calendar in leap years as a corrective measure, because the earth does not orbit around the sun in precisely 365 days.

A leap year (or intercalary or bissextile year) is a year containing one additional day (or, in the case of lunisolar calendars, a month) in order to keep the calendar year synchronized with the astronomical or seasonal year
How to check a year is leap or not ?
is_leap_year = ( year modulo 4 is 0 ) and ( ( year modulo 100 is not 0 ) or ( year modulo 400 is 0 ) )

No comments:

Total Pageviews

Disclaimer : Blog Policies

This blog publishes various general knowledge. errors and omissions expected. The Knowledge documents in this blog meant only to increase the general awareness of the readers. If any of the information available on this blog violates or infringes any of your copyright protection, leave a comment . This blog makes no representations as to accuracy, completeness, correctness or validity of any information on this site and will not be liable for any errors, or delays in this information. The information contained in this blog is subject to change without notice. You may use contents in this blog only for personal use. Reproduction and republishing of any contents from here to any other websites or blogs is strictly prohibited.