• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Something funny about leap years.

Status
Not open for further replies.

Ecrofirt

Member
I just found this out on Thursday.

Leap years don't occur every four years. Here's some info about leap years

* Every year divisible by 4 is a leap year
* BUT every year divisible by 100 is NOT UNLESS the year is also divisible by 400.

Therefore 1700, 1800, and 1900 were not leap years.

Don't believe me? Google it.
 

snapty00

Banned
Interesting.

So the year 1600 was a leap year, right?

Do calendar makers know this? In other words, has this "rule" (or whatever you wanna call it) been upheld, or has it been ignored? Or haven't we come to a time where it was needed yet?
 

Ecrofirt

Member
1600 was a leap year, yes.

And I would imagine calander makers know about it. You'd have some company execs with red faces if they let a slip-up like that happen. You'd have a useless calander after February 28th.
 
V

Vennt

Unconfirmed Member
I remember being taught this at school, yet when I was working Year 2000 compliance work in 97-98 I was shocked to discover the number of developers/programmers that were obviously totally unaware of this, at least judging by their applications failing to recognise 2000 as a leap year. :/
 

Dan

No longer boycotting the Wolfenstein franchise
I've known about this. Mostly just because of programming classes where one problem involved a program that could fine dates in the past and future and determine what day of the week they were.
 
Freeburn said:
I remember being taught this at school, yet when I was working Year 2000 compliance work in 97-98 I was shocked to discover the number of developers/programmers that were obviously totally unaware of this, at least judging by their applications failing to recognise 2000 as a leap year. :/

why would the applications not recognize 2000 as a leap year? 2000 is one of the years divisible by 4 and 400, so wouldn't it have caught the "divisible by 4" at least?

An app not recognizing the "also divisible by 400" wouldn't be affected on the year 2000.
 

Cubsfan23

Banned
Idle Will Kill said:
why would the applications not recognize 2000 as a leap year? 2000 is one of the years divisible by 4 and 400, so wouldn't it have caught the "divisible by 4" at least?

An app not recognizing the "also divisible by 400" wouldn't be affected on the year 2000.

The exception is that if it's divisible by 400, it's not a leap year. Or maybe i got it backwards.......
 
V

Vennt

Unconfirmed Member
Idle Will Kill said:
why would the applications not recognize 2000 as a leap year? 2000 is one of the years divisible by 4 and 400, so wouldn't it have caught the "divisible by 4" at least?

An app not recognizing the "also divisible by 400" wouldn't be affected on the year 2000.

You assume too much :p

Not all applications even used ANY rules, but had hardcoded lookup tables, some accurate, some pure speculation, some, well lets just say that believe me after seeing the 'funky' way some applications dealt with Y2K you have to wonder if some of the developers ever passed infant school math. :p
 

snapty00

Banned
I don't really think anything's changed from what is widely known, EXCEPT that if the year is evenly divisible by 100 (which most leap years aren't, which is why I assume this rule isn't as well-known), then it must also be divisible by 400.

So in a programming-ish sort of way, I guess you'd first check to see if it's divisible by 4.

No? Not a leap year.
Yes? Is it divisible by 100?

No? Then it is a leap year.
Yes? Is it divisible by 400?

No? Then it is not a leap year.
Yes? Then it is a leap year.

Just curious: what's the origin of this rule?
 

Loki

Count of Concision
Cubsfan23 said:
The exception is that if it's divisible by 400, it's not a leap year. Or maybe i got it backwards.......

Methinks you should stick to dispensing dating "advice". ;) :p
 

snapty00

Banned
Geez, I'm not observant at all. When I first looked at that September thing, I thought, "WTF? I don't see anything wrong with it. Maybe he's suggesting the cycles of the moon were weird that month." :D
 

MetatronM

Unconfirmed Member
snapty00 said:
I don't really think anything's changed from what is widely known, EXCEPT that if the year is evenly divisible by 100 (which most leap years aren't, which is why I assume this rule isn't as well-known), then it must also be divisible by 400.

So in a programming-ish sort of way, I guess you'd first check to see if it's divisible by 4.

No? Not a leap year.
Yes? Is it divisible by 100?

No? Then it is a leap year.
Yes? Is it divisible by 400?

No? Then it is not a leap year.
Yes? Then it is a leap year.

Just curious: what's the origin of this rule?
It's because a year (the time it takes for the earth to make one complete revolution around the sun) is about 365.24 days long. If it were exactly 365.25, then they could just do a leap year every fours years and being more or less exactly right. But since it's .01 days short of 365 and a quarter every year, over the course of 100 years, that results in the calendar being ahead by one full day, which is why you skip the leap year on the century marks. But even then, it's still not right because the number isn't EXACTLY 365.24 either. So every 400 years, you still need a slight adjustment in order to make the calendar match the solar date.
 
Status
Not open for further replies.
Top Bottom