Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Leap Year
#15
NIST definition -

Quote:Leap years are years with 366 days, instead of the usual 365. Leap years are necessary because the actual length of a year is about 365.242 days, not 365 days, as commonly stated. Basically, leap years occur every 4 years, and years that are evenly divisible by 4 (2004, for example) have 366 days. This extra day is added to the calendar on February 29th.

However, there is one exception to the leap year rule involving century years, such as the year 1900. Since the year is slightly less than 365.25 days long, adding an extra day every 4 years results in about 3 extra days being added over a period of 400 years. For this reason, only 1 out of every 4 century years is considered as a leap year. Century years are considered as leap years only if they are evenly divisible by 400. Therefore, 1700, 1800, 1900 were not leap years, and 2100 will not be a leap year.  However, 1600 and 2000 were leap years, because those year numbers are evenly divisible by 400.
Now I have to go back and examine what I stated earlier.

Looks like you're right again

As an non-simplified truth table mine may be correct as well
if simplified, I believe the results would be that same as yours
Reply


Messages In This Thread
Leap Year - by MartinEvtimov - Mar-09-2017, 06:19 AM
RE: Leap Year - by buran - Mar-09-2017, 07:02 AM
RE: Leap Year - by wavic - Mar-09-2017, 07:07 AM
RE: Leap Year - by MartinEvtimov - Mar-09-2017, 05:45 PM
RE: Leap Year - by buran - Mar-09-2017, 07:51 AM
RE: Leap Year - by wavic - Mar-09-2017, 08:33 AM
RE: Leap Year - by Ofnuts - Mar-09-2017, 08:56 AM
RE: Leap Year - by Larz60+ - Mar-09-2017, 02:45 PM
RE: Leap Year - by Ofnuts - Mar-09-2017, 04:42 PM
RE: Leap Year - by buran - Mar-09-2017, 05:08 PM
RE: Leap Year - by wavic - Mar-09-2017, 05:30 PM
RE: Leap Year - by buran - Mar-09-2017, 05:35 PM
RE: Leap Year - by Larz60+ - Mar-09-2017, 07:25 PM
RE: Leap Year - by Ofnuts - Mar-09-2017, 11:49 PM
RE: Leap Year - by Larz60+ - Mar-10-2017, 01:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to get year not the entire year & time mbrown009 2 891 Jan-09-2023, 01:46 PM
Last Post: snippsat
  Problem with module time and leap seconds Pedroski55 3 1,251 Oct-07-2022, 11:27 PM
Last Post: Pedroski55
Photo Algorithm for leap year (structogramm coder_sw99 3 2,238 Jul-23-2021, 02:13 PM
Last Post: DeaD_EyE
  Leap Year Issue spalisetty06 3 2,230 Jul-02-2020, 03:29 PM
Last Post: bowlofred
  leap year program issue jashajmera 3 3,885 Feb-04-2017, 11:51 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020