Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Leap years - Perhaps you didn't know?

Author
Message
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Feb 2008 22:56
29th of February today. The leap year day. Only every four years, right? No.

A leap year is every year divisible by 4.
Unless it's divisible by 100, in which case it is NOT.
Unless it's divisible by 400, in which case it IS.

Which means that during some rare times there are 8 year gaps.

We can have leap seconds too, due to the fact that as opposed to 365.25 days per year, it is closer to 365.24.

Anyone know anything else?

Lee Bamber - Blame Beer
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 29th Feb 2008 22:59
Yes, i can leap 1 second into the future. I do it on a regular basis, approximately every second. And don't tell me to stop, because i won't. And noone can stop me, literally. MOHOHAHAHA!!!11

This message was brought to you by Grandma industries.

Making yesterdays games, today!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Feb 2008 23:48
Yes, I know something else.

In the year 2000, people were so concerned about the Millenium bug that there was a second wave of panic once it passed, over whether the year was also a leap-leap year or not. It wasn't, but some people started coding for it.
Samoz83
21
Years of Service
User Offline
Joined: 3rd May 2003
Location: Stealing Ians tea from his moon base
Posted: 1st Mar 2008 00:12
Quote: "And noone can stop me, literally"

what if I kill you?

www.firelightstudio.co.uk
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Mar 2008 00:49
Quote: "In the year 2000, people were so concerned about the Millenium bug that there was a second wave of panic once it passed, over whether the year was also a leap-leap year or not. It wasn't, but some people started coding for it."

I thought the whole "millennium bug" was because older computers only had two digits for the year in the date (e.g. '84 = 1984) so when the millennium came they'd reset to '00 or 1900!
Don't know why that would cause a problem though so maybe I'm wrong.

Agent Dink
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 1st Mar 2008 01:01
It'd mess up banking records and maybe some scheduled tasks? I dunno. I look back and laugh at how it got blown out of proportion. Please enlighten me as to why a computer thinking it was 1900 would bad.

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Mar 2008 01:16
Quote: "It'd mess up banking records and maybe some scheduled tasks?"

Yes, from 1900

Quote: "Please enlighten me as to why a computer thinking it was 1900 would bad."

I don't know that's just what I heard. Some non-computerists might have thought it would just crash after 99 instead of looping back to 00?

Agent Dink
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location:
Posted: 1st Mar 2008 01:41
Well I wasn't making fun of anyone. My family got prepared for it too. But I wish I knew all I know about computers now. I would have been bothered to research it and see if there was actually a threat.

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 1st Mar 2008 02:53 Edited at: 1st Mar 2008 02:54
Funny how no one mentioned that our calendar is quite off.

Nearly 20 years off. And I do mean the Roman Calendar.

Now off to find an article on this

Quote: "Unless it's divisible by 400, in which case it IS."


2008/400 = 5.02

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 1st Mar 2008 03:05 Edited at: 1st Mar 2008 03:28
n008, the original post spells out the algorithm quite correctly. You don't divide by 400 unless it is divisible by 100. 2008 is a leap year because it is divisible by 4, and not divisible by 100. 2000 was a leap year because it is divisible by 4/100/400. 1900 was not a leap year because it is divisible by 4/100...but not by 400.



Leap seconds are used to correct our time with sidereal time.
The Julian calendar is not referenced to any other calendar, only to itself.
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 1st Mar 2008 03:20
Oh my bad. I read that wrong.

I read Is 2008 divisibel by 400? Yes.." :x

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 1st Mar 2008 03:29 Edited at: 1st Mar 2008 03:30
It isn't, but it already passed the requirement of not being divisible by 100, so it should fall out of the algorithm as a leap year before that point. The real worry is the Mayan Long Count, imo!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Mar 2008 06:53
my friends birthday is actually on 2/29. I think that makes her, umm, 6 today.


Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 1st Mar 2008 08:05
Quote: "what if I kill you?"


My dead body would still leap trough time, it's not like it would stop doing that if i'm dead. You're welcome to try though.

This message was brought to you by Grandma industries.

Making yesterdays games, today!
tha_rami
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 1st Mar 2008 15:20
My doctor is 14 years old, actually.

The millennium bug was a potential problem because it would be a bit odd that the computer thinks things are scheduled next millennium (1-1-2000) which would be conveyed by the stupid thing as 1-1-1900. Banking records, stuff like that, could all get screwed up as most programs by that time had a form of 4-digit dates.

Wasn't there some sort of similar bug coming up in 2040 or something?


A mod has been erased by your signature because it was larger than 600x120
Zumwalt
17
Years of Service
User Offline
Joined: 1st Feb 2007
Location: Tampa, FL
Posted: 1st Mar 2008 16:01
Mainframe applications were all 2 bit, not 4 bit. The code was procedural and the fields in the database only took 2 digits. They had no stored information in the databases that stated what century, only what year. 0-99. The centry was 'assumed' to be 19'th. They thought they had 50+ years to solve the issue, so why bother planning ahead.

The funny thing about the y2K bug was that the only people it actually effected were mainframe applications, unix based applications and xerox based systems. Ironically it had nothing to do with any programs that were not date dependent and some idiot didn't hard code it to ignore the century marker.

Leap year is the biggest issue right now though.
Calendar applications that didn't take into consideration the century obviously caused issues, like CCMail and Lotus x2 or Lotus x3 versions. All of that stuff had to be upgraded to at leasat 4x versions since calendaring and scheduling along with mail messages had invalid dates in them. It wasn't a show stopper by any means, but companies flew me around the workd to upgrade there mail servers.

The fact is though, he is right about leap year, technically speaking our calendar is off by around 20 years, we are not on the right day let alone the right time in the julian calendar. Not to mention the new time scale that Mr Bush put is on so that our daylight hours match voting hours. What kind of crock was that? Costs companies millions just so the sun would be up when Mr Bush wanted it for voting instead of pushing voting hours back. Now thats stupidity.
El Goorf
18
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 1st Mar 2008 16:14
did you also know that by tradition, it's on the 29th of feb that the woman proposes to the man, instead of vise versa?

so, any shy males out there waiting for the lady to make the move, looks like you either need to pluck up the manbits to ask yourself, or be doomed to wait another 4 yrs

http://notmybase.com
All my base are not belong to anyone.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 1st Mar 2008 16:39
The millennium bug wasn't that computers using only 2-digit years would reset to 00.

If that was the case then there would never have been an issue. The problem was that they would never reach 00, they would reset to date of manufacture. This said it would only affect the system clock on fairly old systems that wouldn't roll round to atleast 00; others were patched to hold all four numbers.

Atleast we're good to the year 9999 now
Anywho, each year varies it's length the same way each day does.

364.25 day and 23.58 hr are not exactly the same from year-to-year or day-to-day given gravitational pulls from the different planetry bodies. Hell it's a common misconception we float in a perfect circle around the Sun when we're actually orbiting in an ecliptic way.

Everything is rounded off, then adveraged to keep it all in check and easier for us to keep track of. What's possibly more confusing is that different parts of the planet days are actually different lengths anyways; why do you think time is based-on GMT?

Quote: "did you also know that by tradition, it's on the 29th of feb that the woman proposes to the man, instead of vise versa?"


There was some logic behind that once, but doubt it holds very true anymore. I doubt modern women really pay any attention to traditions now, but that said I've never heard of anyone (atleast that I know of) where the lass proposed to the guy ... no matter how "equal" women claim they want things, I doubt some things will ever change tbh

That said, must be a pain in the arse if you're a lesbian

bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 1st Mar 2008 16:48
Quote: "Hell it's a common misconception we float in a perfect circle around the Sun when we're actually orbiting in an ecliptic way.
"


I've never heard anyone say that we orbit in a perfect circle. I think that's been figured out since Kepler came along


Hurray for teh logd!
tha_rami
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 1st Mar 2008 18:35 Edited at: 1st Mar 2008 18:35
Quote: "There was some logic behind that once, but doubt it holds very true anymore. I doubt modern women really pay any attention to traditions now, but that said I've never heard of anyone (atleast that I know of) where the lass proposed to the guy ... no matter how "equal" women claim they want things, I doubt some things will ever change tbh"

Emancipation lasts as long as their technology lasts.


A mod has been erased by your signature because it was larger than 600x120
Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 1st Mar 2008 22:54
Leap day is the only day where everyone works for free! Because most companies don't account for it.

RIP Max-Tuesday, November 2 2007
You will be dearly missed.
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 1st Mar 2008 22:57
Quote: "Leap day is the only day where everyone works for free! Because most companies don't account for it.
"

... Hehe. Brilliant.

Lee Bamber - Blame Beer
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 1st Mar 2008 23:14 Edited at: 1st Mar 2008 23:15
Quote: "There was some logic behind that once, but doubt it holds very true anymore"


If I remember correctly, the tradition links back to an Irish legend regarding St. Patrick + St. Bridget in the 5th or 6th century.

Nuns at that time were allowed to marry, but most of them were ignored etc. by the townsmen. So St. Bridget asked St. Patrick whether there could be a day when women (especially the nuns) could ask men to marry them rather than the other way round.

Legend has it that St. Patrick agreed, allowing such a thing to occur every 4 years, and the rest is history


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 1st Mar 2008 23:29 Edited at: 1st Mar 2008 23:30
Seeing as computers work in bytes (and I presume a programmer who was trying to save memory would use 8-bit bytes), wouldn't they crash in the year 2156, what with that being 256 years after 1900?


I fail at life. No, really.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Mar 2008 00:39
Here's probably more than you ever wanted to know about the reasons behind the y2k bug and leap year calculations.

First thing to remember is that the vast majority (and I *do* mean vast) of software running business systems in the World today is written in COBOL - most COBOL storage is done with characters, not binary data (ie 2008 would be 4 bytes and human readable, not 2 and in binary).

The second thing to remember is that unlike today, storage was very expensive, so the less storage you use, the better ... and that's where the 2 digit year format came from, as an attempt to remove 2 bytes of storage by dropping the century from the year. That's where the original convention of using 2 digits came from.

The third thing to remember is that when a lot of these systems were written (from the 60's through to the 90's) no-one really believed that their code would still be running at the turn of the century, so didn't really worry about what would happen when the new century occurred - neither for the rolling over of the year back to zero, or the fact that it was a leap year.

The fourth thing to remember is that businesses don't like to spend money, so why replace an existing system when you can expand it or update it. Some of the software from the 60's is still running in some of our financial institutions, maybe not in it's original form, but the roots are still there.

All of those things together caused the Y2K scare. It was real too - the company I work for spent literally 100's of man-years ensuring that all the software we wrote could cope with the rollover, either by expanding the year to 4 digits, or by altering the software to cope correctly with 2 - I was paid very well for being on call over that new year and got no calls

The next big date problem will be in early 2038 when the 32 bit unix epoch date rolls over - unix records time as seconds passed since 01/01/1970, and the 32 bits used to record that will roll over at that time (it's a signed number, which is why the date of rollover isn't in the 2100's).

Osiris
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: Robbinsdale, MN
Posted: 2nd Mar 2008 19:54
Quote: "The next big date problem will be in early 2038 when the 32 bit unix epoch date rolls over - unix records time as seconds passed since 01/01/1970, and the 32 bits used to record that will roll over at that time (it's a signed number, which is why the date of rollover isn't in the 2100's)."


that means all the robots that will be our overlords will die in 2038 because they wont want to run windows, so they will choose unix. Haha sucks for them.

RIP Max-Tuesday, November 2 2007
You will be dearly missed.
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 2nd Mar 2008 22:42
Quote: "Leap day is the only day where everyone works for free! Because most companies don't account for it."


Speak for yourself, we get Feb. 29th off as a holiday

It's only fair for those of us on salary.


Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 3rd Mar 2008 17:15
<Shakes head>
I wish teachers would get it right. Mine mentioned about how leap years are every 4 years... tsk tsk tsk.

Lee Bamber - Blame Beer
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Mar 2008 18:10 Edited at: 3rd Mar 2008 18:18
I learned that formula in 4th grade...about 1972 (a leap year). I wrote the snippet above in C in 1998 because an engineer had written a similar (though extremely complicated), but flawed version. I was asked to check it for 'Y2K' compatibility. I said that it would fail after 2000 exactly as it did before 2000; I said it was compliant, but incorrect.

I too spent alot of time fixing code to be Y2K compliant. The 2038 thing is actually a limitation of the C runtime function 'ctime'. There is a 64 bit fix already in place (ctime64), so this time around, it will be easier. (Good thing, I will be 75 then, and in no mood to fix other's code by then, I'm sure.)

ps mere babel works, too, but that's mean.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Mar 2008 18:55
Quote: "Leap year is the biggest issue right now though.
Calendar applications that didn't take into consideration the century obviously caused issues"

But 2000 was a normal leap year. The last abnormal leap-year was 1900 when there were no computers to worry about. The next one is 2100, so it's not an issue yet.

Quote: "The millennium bug wasn't that computers using only 2-digit years would reset to 00.
If that was the case then there would never have been an issue."

er...no. That was exactly the problem. For non-compliant programs, 00 was 1900, not 2000. I spent several years working on the Millenium bug for various companies. It involved extending the date field, or converting the space that the alpha filed occupied into numeric space for a more convenient way to store the data. All references to dates then had to be recoded. If you were lucky, the system would have a generic routine for all date calculations. Even then, for the sytems involved, it involved a complete recompile of all programs to include the new routines.

Like IanM says, COBOL was the biggie. I worked on IBM AS/400s and System/38s, which progressed from COBOL to RPG, and retained all the same problems . And when people say the Millenium bug was a huge scare-tactic that never happened, I can tell you that there was a hell of a lot of work went on to make it the successfully damp squib that it was.

The next real issue after Y2K was the introduction of the Euro and triangulation rules for conversion.

2038 is the next problem date? I didn't realise that. Ironically, the one after that is 2039, when IBM 2-digit calendars roll over to 1940!
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 3rd Mar 2008 18:59
Quote: "
that means all the robots that will be our overlords will die in 2038 because they wont want to run windows"

64-bit versions of Windows.


Image made by the overworked Biggadd.
GatorHex
19
Years of Service
User Offline
Joined: 5th Apr 2005
Location: Gunchester, UK
Posted: 3rd Mar 2008 20:12 Edited at: 3rd Mar 2008 20:13
During the milleniuum bug computers went back to the start of Unix time which is the number of seconds since 1970

Also everyone who celebrated the millenium in the year 2000 was 1 year too early! There is no year zero in the Christian calendar so the 2000 years didn't occur until 2001

The earth rotation is slowing down and leap seconds are to account for this! The moon is moving further away and eventualy the planet will lose it's atmosphere!

DinoHunter (still no nVidia compo voucher!), CPU/GPU Benchmark, DarkFish Encryption DLL, War MMOG (WIP), 3D Model Viewer
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 3rd Mar 2008 20:16
We knew that at the time, and we still partied like it was 1999... Because it was.


Hurray for teh logd!
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Mar 2008 20:59
1900 was not a leap year. 2100 will not be a leap year, either.

Pseudocode from Wiki:
if year modulo 400 is 0 then leap
else if year modulo 100 is 0 then no_leap
else if year modulo 4 is 0 then leap
else no_leap

I still like mine better. Why go through the mod 400/mod 100 first, especially after 2000? You code to the most common situation first, then the others.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Mar 2008 21:15 Edited at: 3rd Mar 2008 21:15
Quote: "1900 was not a leap year. 2100 will not be a leap year, either."


that's what I said...
Quote: "But 2000 was a normal leap year. The last abnormal leap-year was 1900 when there were no computers to worry about. The next one is 2100, so it's not an issue yet."
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Mar 2008 21:26
Maybe I'm thick, but that is not what that says to me. Sorry.
Dazzag
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Cyprus
Posted: 5th Mar 2008 17:29 Edited at: 5th Mar 2008 17:30
Quote: "I look back and laugh at how it got blown out of proportion"
Not exactly. I mean if we handn't of handled it (I mean like pretty much everyone) then all sorts of things would go wrong. Doubtful if Doomsday level they promised, but still lots of annoying things no doubt.

I mean our own system (about 100 travel companies at the time, with a system of 6000+ programs) would have had a load of hassle if we hadn't of fixed it. And with airports being a real stickler for detail then there would have been a lot of problems with our customers and companies maybe going out of business because of it.

In the end we took about 3 months of programming (and loads of overtime) to change everything (fingers hurt for ages later cos was a lot of repetitive stuff) and about 2 years to roll it all out. Started in 1997 and finished all clients in 1999.

Heh, we employed a pretty standard solution for legacy systems (we still only use 2 chars for year storage), that was thought up by our MD. Afterwards I found out a similar rolling window system (think thats what it is called) that would have done us forever, but as it happens our fix should net one of us a nice contract to fix things if any of our systems are still in use in 2047.

Cheers

I am 99% probably lying in bed right now... so don't blame me for crappy typing
Current fave quote : "She was like a candle in the wind.... unreliable...."
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Mar 2008 18:51
Quote: "Maybe I'm thick, but that is not what that says to me. Sorry"

A normal leap year has 29 days in February, and occurs every 4 years. My definition of an abnormal leap year is one that has occured on the 4-yearly cycle, but doesn't have 29 days in February
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 6th Mar 2008 04:24 Edited at: 6th Mar 2008 04:25
Boring... I Mean Interesting Thread.... I made some coin during this fiasco, and I wrote a 10000 year "rollabout" eternal system myself.. 9999 years, even with a flag to handle the previous 5000, and next - so it would just work all the time. No one bit... oh well.

Funniest thing in this whole Thread:

ZumWalt gets the prize for making me have a good laugh:

Quote: "Mainframe applications were all 2 bit, not 4 bit"


Login to post a reply

Server time is: 2024-11-20 00:32:52
Your offset time is: 2024-11-20 00:32:52