Leap Year Program

randerson112358
4 min readSep 10, 2018

Nearly every four years is a leap year.

A leap year, which was invented by Julius Caesar and later corrected during the introduction of the Gregorian calendar, has 366 days instead of the usual 365 days in the Gregorian Calendar ( a calendar introduced by Pope Gregory XIII). It takes the earth about 365.24 days to orbit around the sun. The normal 365 days is about 1/4 short of a complete rotation, and a leap year is about 3/4 days over a tropical year.

More specifically it takes the earth about 365.242189 days or 365 days, 5 hours, 48 minutes and 45 seconds to orbit around the sun. The Gregorian calendar (a.k.a the most widely used calendar in the world today) only has 365 days in a year and so if we did not add the extra day (a leap day) on February 29 NEARLY every 4 years, we would lose about 6 hours off the calendar every year. This means after one hundred years, the calendar would be off by about twenty four days.

Leap Year Criteria

There are 3 criteria that must be taken into account to identify a leap year.

  1. If the year can be evenly divided by 4 then it is a leap year
  2. If the year can be evenly divided by 100, and it is not evenly divided by 400, then it is NOT a leap year.
  3. If the year is evenly divisible by 400, then it is a leap year

--

--

No responses yet