Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
News

Leap Year Woes in Japan 302

joerg writes, "The Heise-Newsticker says that Japan had several intercalary day-related computer problems like weather stations delivering wrong data. " Finally! A Y2K bug! The hype was justified! (cough, cough) Anyone have a birthday today?
This discussion has been archived. No new comments can be posted.

Leap Year Woes in Japan

Comments Filter:
  • by Anonymous Coward
    Go look it up. The leap day was last week -- the extra day is the 24th, not the 29th.
  • by Anonymous Coward
    Happy Frederick's Birthday!

    (I can't believe no-one else posted this yet.)
  • No... from what I understand of the rules....
    Divisible by 4, yes, unless
    divisible by 100, then no, unless
    divisible by 400, then it is.

    So...
    1900, no
    1904 yes
    2000, yes
    2004, yes
    2100, no
    2104, yes
  • Point taken. My bad :)
    --
  • We actually did have Y2K bugs left on the ancient IBM mainframe here at my university. And, lo and behold, the behemoth skipped over Feb. 29 as well (my pay period ends Saturday March 12).

    I have this feeling that in the year 2100, these old eniacs will still be operating, and February that year will have 29 days. :-)

    --

  • According to the papers here in Tokyo this morning, the ATMs at the Post Office (the Japanese Post Office offers savings accounts) broke down--not because an internal LSI didn't know that 2000 was a leap year, but because it
    didn't know about leap years at all! The same problem will happen again in 2004 unless they fix it by then.
  • Today is Clark Kent's birthday. (yes, _that_ Clark Kent)
  • Aah, Pirates of Penzance.. Funny!

    Your Working Boy,
  • Correct me if I'm wrong but the leap year rules are as follows, leap years occur when the year is divisible by 4, except when the year is
    divisible by 100 unless the year is divisible by 1000.


    Well..you asked for it *LOL* you're mostly right...but it's except when the year is divisible by 100 UNLESS it's divisible by 400 hence 1700, 1800, and 1900 were all NOT leap years. which would make 1000 NOT a leap year...right?
  • That's if divisible by 4 unless divisible by 100 unless divisible by 400, not 1000. 2400 is the next divisible by 100 leap year, unless there's a new calendar system by then.
  • We have two Adars this year. Whatever else you think about adding a month every once so often it's served us pretty well for a few thousand years. I mean if you can never get a precise linear calendar then why not add your corrections in the most obvious and practical way instead of having to jump through hoops?
  • isleap = false;
    if(year%4 == 0) {
    isleap=true;
    year%100 == 0 ? isleap=false;
    year%1000 == 0 ? isleap=true;
    }

    That's rather complicated way of expressing it. And it's wrong too, since it's every 400 years, not every 1000 years, that a multiple of 100 is a leap year.

    Wouldn't it be easier to just write:
    isleap = !(year%4) ^ !(year%100) ^ !(year%400);


    --
  • In the UK, tradition holds that a woman can only ask a man to marry her on leap days i.e whenever February 29th occurs.

    a) Is this also true in the US of A ?

    Definitely not true for the USA. Traditionally speaking, women are never supposed to propose. But traditions are pretty much out the window in this day and age. I'm rather glad that traditions about men and women are being questioned these days...they were really in dire need of change.

  • Well, the fastest way to do a mod 4 (which conveniently is a power of 2) is to AND with 3. :-) Which should save you one IDIV.
  • Specifically, "Pirates of Penzance". :-)

    --
  • Hmmm. My Nortel phone is smug in its certainty: "02-29".

    --

  • Yep, The NorTel phone on my desk is proudly beaming:
    Mar 1 9:20am.
  • Happy Birthday to my nephew Mason who is 12 today.
  • These are just publicized because it Y2000,
    but probably had same rate of failures in 1996
    and will have in 2004.
  • Check out http://linuxberg.mirror.ac.uk [mirror.ac.uk] in Netscrape 4.x for Linux. Look for the big date in red.... doesn't happen in IE, or in Netscrape for non-Linux platforms (Windoze and AIX tested so far). Silly javascript :)

    In Opera 3.62 ß6 under Windoze 4.10.1998, it shows the date as 29, That's all - no month, no year.

  • <I>Isn't it odd that the ancient cultures did not have the concept of celestial gravity, yet they were able to make use of leap years. </I>

    Not at all. Knowledge of gravity isn't necessary. They simply discovered the year - seasons repeat after about 365 days. This isn't hard to count, and you can measure how high in the sky the sun gets with very primitive instruments, such as a long stick. Or some well-placed stones. The stones are better as they easily last several years. With this they noticed how the year isn't exactly 365 days, so they added leap years to keep the calendar in sync with the seasons.
  • A year is a leap year if it is divisible by 4. Unless it is divisible by 100 and NOT divisble by 400 (1700,1800,1900,2100). 1600 and 2000 ARE leap years.
    Surely:-
    A year is a leap year if it is divisible by 4 and the result is a whole number.
    Otherwise every year is divisible by any number.
  • What's even worse is when they combine half-assed knowledge w/ windowing.

    So you end up with code like:

    If (2-digit-year) mod 4 = 0 AND (2-digit-year) != 0
    then it's a leap year

    This code works from 1900 to 1999. But fails in 2000. Considering it was written in the 1980's, isn't that remarkably short-sighted? And these aren't historical dates... they're current rundates!
  • Does it mean something that they are all actors or just the poster doesn't know anybody else?
  • It's a Y2K problem in the sense that the rule goes:

    isleap = false;
    if(year%4 == 0) {
    isleap=true;
    year%100 == 0 ? isleap=false;
    year%1000 == 0 ? isleap=true;
    }

    The extent to which the rules are well-known are inversely proportional to their frequency. Hence, the 100 year exception is quite well known, the 1000 year exception is less well known.

    I'm guessing the programmers here knew the 100 year exception, and programmed it in, but didn't happen to know about the 1000 year exception, and didn't look anything up. Assumptions, always a bugger, expecially with dates.

    (c) Slim, 19100
    --
  • NIST [nist.gov] agrees with your first link. The issue, as I understand it is that leap seconds replace leap days for finer tweaking.
    --
  • F0URTH P4SS 4T TR4N5L4Ti0N. i 4M 31337.

    7Hi5 7U35D4Y'5 134P D4Y BR0U9H7 50M3 5URPRi5iN9 (0MPU73R PR0B13M5 70 7H3 Hi9H-73(H N47i0N 0F J4P4N. 4((0RDiN9 70 7H3 R3U73R5 N3W5 493N(Y, 1200 47M5 10(473D iN P057 0FFi(35 3XP3Ri3N(3D 134P-D4Y-R31473D PR0B13M5. 1iK3Wi53, 7H3 J4P4N353 W347H3R 0FFi(3 H4D DiFFi(U17i35 Wi7H 10(41 73MP3R47UR3 4ND PR3(iPi747i0N M345UR3M3N75. 4((0RDiN9 70 R3P0R75, 43 5747i0N5 411 0V3R J4P4N H4V3 B33N 7R4N5Mi77iN9 iN(0RR3(7 iNF0RM47i0N 5iN(3 7Hi5 M0RNiN9. 45 34R1Y 45 M0ND4Y 50M3 24-H0UR F0R3(4575 W3R3 PRiN7iN9 Wi7H 3RR0R5: 7H3 '29' iNDi(47iN9 7H3 1457 D4Y 0F 7H3 F0R3(457 B3(4M3 '1'. iN N0R7H3RN J4P4N, 7H3 53i5Mi( 4(7iVi7Y M0Ni70R5 iN 20 R39i0N41 0FFi(35 F4i13D; H0W3V3R, UN1iK3 47 7H3 574R7 0F 7H3 Y34R, 7Hi5 7iM3 7H3R3 W3R3 N0 R3P0R75 0F M41FUN(7i0N5 iN J4P4N'5 NU(134R P0W3R P14N75.
    ---
    "'Is not a quine' is not a quine" is a quine [nmsu.edu].

  • This is what I was trying to do. My 6800 assembler is a little rough so it may not assemble without modifications.
    LDD 0, Y
    LDX #$0004
    IDIV
    BNE false
    LDD 0, Y
    LDX #$0064
    IDIV
    BNE true
    LDD 0,Y
    LDX #$0190
    IDIV
    BNE false
    true LDAA 1
    BRA exit
    false CLRA
    exit NOP

    Please post any corrections.

  • Do you have a picture of it? That'd be nice.
  • isleap = false;

    if !(year % 4) {
    isleap = true;
    year % 100 == 0 ? isleap = false;
    year % 400 == 0 ? isleap = true;
    }

    Why make things harder on yourself? isleap = (!(year % 4) && (year % 100)) || !(year % 400);

  • You save the time and effort, don't ask the user the year, and the user has to make a minor correction once every four years (roughly). Is choice #2 really that ugly?

    I have to make a correction to my watch every other month (almost), and I'm perfectly happy with that arrangement...

    Computers are a different story, but I trust my timezone files with that. They even get daylight savings time on and off at the right dates and hours (which my watch doesn't do either).

  • One other reason the 33 year cycle was more attractive for a Christian calendar is because thats' the traditional lifetime of Jesus.

    But, I mentioned teh 24 hour wander of the time fo the equinox. The equinox is used for the calculation of a number of religious holidays - such as easter. With the gregorian clanedar the wander in time is so large that it can't be kept on the one day. But with the Persian calendar, you can keep it on the same day *if* you choose teh correct meridian.

    It just happens that this meridian is about 77 degrees west - roughly where washington DC is... but more interestingly - where Britain founded its first colonies. So, the protestant church could have established this new, more accurate, calendar and if there was a suitable settlement at that longitude, claimed that this was the rightful location of the centre of the christian church.

    As it happens the first colony was not well equiped to survive (because tehy were in fact a load of astronomers sent to figure out where teh correct longitude was) and disappeared when britain was unable to supply them for a year.

  • Actually - there's a really trivial way to calculate it.... I just can't remember what it is.
  • > Again IIRC 1600 was the last leap year at the turn of a century.

    Nope. 1700. The 400 rule is a recent addition.
  • > Following that logic, the years 1700...

    Except that this rule wasn't adopted in 1700 and 1700 *was* a leap year.
  • The bug is intentional. Microsoft is copying the behaviour of the date handling in Lotus 1-2-3, which made the original error.
  • All JDKs prior to 1.1.something are not leap year compliant.

    That puts a nice DOT in .com...
  • At work we suffered from the bug in old Sun JDKs (old is JDK 1.2.1 and JDK 1.3Beta which came out just a couple of months ago). Our applications all gave date ParseExceptions and we had to advance the clocks to March 1.

    See: http://developer. java.sun.com/developer/bugParade/bugs/4209272.html [sun.com]

  • all salaried employees are working for free today

    Not exactly. Consider the following two cases:

    1. Biweekly. You're paid for every ten workdays, your first check in March happens to fall a day earlier than it did in February, when in most years it falls on the same day.
    2. Monthly/Semimonthly. You're paid on the presupposition that there are an average of 22-or-so working days in a given month. This year, February actually has 21 (including the holiday), so while you aren't seeing your average hourly rate go up as much as it does MOST Februaries, it's still slightly above average.

    Since I mentioned the holiday in February, does anyone else feel kinda shortchanged by the fact that from the last week of November to the middle of February there are five legal holidays, but from the second week of July to the end of August there aren't any? (I know I'm drifting dangerously close to offtopic here...).



    This is my opinion and my opinion only. Incidentally, IANAL.

  • I have noticed that some applications written using Clipper are also having a problem with today's date. The problem appears to be with programs that never got "Y2K fixed" by adding a SET EPOCH command.

    Clipper has always handled dates correctly internally and in its data files; the only Y2K issue appears to be in converting a character representation to the internal format. (For example, in the DTOC() function or in a GET.) Apparently, Clipper programs that haven't had SET EPOCH added have still sort of been working this year anyway. If a year 2000 date is generated internally, and you do a GET on that date, it keeps its 2000 year as long as the user doesn't try to edit it. Or at least, it worked until today. Today, we found out (the hard way) that if you have a date of 02/29/2000 (displayed as 02/29/00) and try to get edit it, Clipper thinks it's an invalid date. The solution is to just Y2K-fix your program (using SET EPOCH), as we all should have done a long time ago.


    ---
  • What sort of person would design a system and think that although it wouldn't be used in 2000, it would be used in 1900?

    Ada and Chuck, of course! We're still getting the kinks out of their crufty hacks. Talk about legacy code!

    if (year==1900 && month==2) day++ /* y1900 patch --AL */

    ---
  • In the UK, tradition holds that a woman can only ask a man to marry her on leap days i.e whenever February 29th occurs.

    a) Is this also true in the US of A ?
    b) has anyone been fortunate (or unfortunate) enough to ask/ do the asking and
    c) what was the reply ?

    Incidentally, guys, if you refuse, a further tradition says that you have to buy her some silk gloves as compensation. [Cheap way of getting out of commitment IMHO :-) ]

  • It's not totally true in Engalnd either - as I said, I'm referring to tradition, not actuality.

    [Personal note: I "hinted" to my fiancee that she should propose to me, which she did, via a "Will You Marry Me?" Easter Egg :-) I accepted, by means of a return "Yes" Easter Egg! ]
  • Just want to let you guys know, my watch was blinking March 1st this morning. But I didn't get the Blue Screen of Death from it when I changed the date to February 29th. Hopefuly it'll remember 4 years from now that 2000 was a leap year.

    Good luck to the people born on February 29th who are now considered by computers as non-existant :)
  • My Birthday was yesterday. Turned 24, which, if you do the math, means I was born on a leap year (76). When I was born, people were saying the same thing, for my Mom to wait till the 29th. Aparently she was like "screw that, this kid is coming out now!" and I was a delevered a few hours before the 29th rolled around.

    I always wondered what it would be like to have a birthday on the 29th. Like, when would I celebrate it, Feb 28, or Mar 1? See, this is the kind of thing that screwed me up as a kid. ;)
  • I'm sure a lot of people forgot the "unless the year is divisble by 400" part of the rule that says century years aren't leap years.

    I personally know of a multimillion-dollar system that was installed in 1998 and doesn't recognize the leap day today. And this was discovered in September of 1999. Major rush job to clean things up, finished a couple weeks ago, but only the "essentials" are totally recognizing it; anything that isn't date-critical will be displaying 3/1/2000 today AND tomorrow.


  • I was born 12:04 AM March 1, 1980. Tomorrow is my 20th birthday. Had I been born 5 minutes earlier, today would be my 5th birthday, a la Kintanon here :)

    Happy birthday, by the way...

    Anthony
  • Mine too. It's a Timex Ironman Triathlon. Said it was 3/1 today. Since there's no year for me to set, I don't know how it would get it right. IIRC, no digital watch I've had has gotten Feb. 29th correct.

  • Today, February 29, 2000, a leap year day, brought some unexpected disturbances to high-tech Japan. Reuters, the news agency, reports that 1200 ATMs in non-Y2K compliant post offices were out of order. The Japanese weather service had problems with the reporting of local temperatures and precipitation. According to the report, 43 stations across the country have been misreporting data since this morning. Even on Monday, several 24-hour forecasts were incorrectly printing the date as the 1st instead of the 29th. In the north of Japan, seismometers at 20 local offices are malfunctioning. However, no problems at nuclear plants in Japan have reported any difficulties.

    - correct my translation if you like, I'm German/American but don't claim to be an expert.

  • "I" before "E" except after "C", except with an "A (sound)" as in "Neighbor" and "Weigh". Except on thrusdays and all throught May. You will always be wrong no matter what you say.
  • Depends where you live(d).

    The modern gregorian calendar was introduced by Pope Gregory XIII in 1582. However, it was only adopted by roman catholic countries in 1582, other countries, including Britain and Russia remained on the Julian calendar.

    1600 was a leap year in both the gregorian calendar and in the julian calendar, and 1700 was a leap year in only the julian calendar.

    Britain (And it's colonies, including America) adopted the Greogrian calendar in 1752, but other countries switched at other times, eg Egypt in 1875, Russia in 1918 and more recently Turkey in 1927.

    So depending on where you are, the last '00 leap year could have been in 1600,1700,1800 or 1900.

  • If you are going to call Y2k any problem with leap year or year end rollover, then not even close.

    In 1988 a bunch of sun's stopped working [ncl.ac.uk], and people who created accounts with ADM (whatever that is) found they couldn't log in [ncl.ac.uk]. A bunch of BBS's Crashed [ncl.ac.uk].

    I don't have any URL's, but I recall that in 1984, Primos machines suffered an outage when the backup program attempted to create a tape to expire on 29FEB85.

    I'm sure there are many instances before that, but i'm not familiar with them. I'd say that date's have always been a problem in programs, simply because they're so complex, and easy to get wrong.

  • isleap = false;
    if(year%4 == 0) {
    isleap=true;
    year%100 == 0 ? isleap=false;
    year%400 == 0 ? isleap=true; // --- NOT 1000!
    }

    Though this won't bite you until 2400...
  • You could always combine the best of the lunar and solar calendars and switch to the Hebrew calendar. Or switch to the Chinese calendar--they use a lunar/solar system, and bypass all of those wierd exceptions that the Hebrew calendar uses to keep certain Jewish holidays on certain days of the week.

    Of course figuring out when the leap months are is a bit of a pain in the neck--no regular rules like the Gregorian that any idiot (even many programmers) can keep track of.

    Or we could scrap the idea of keeping up with seasons and switch to the Islamic calendar. Of course it's a pain in the neck to program--as the start of the month in most Islamic countries is called by some religious dude looking up and seeing the new moon. ("Hey, it looks like the new moon today! I declare today the start of Muharram!")

    Hard to program, unless we equip these old guys with a T1... :-)
  • My friend Tim has a birthday today. Poor guy, he won't be legal for alcohol until he's 84!
  • Since the first of the year, I've seen lots of mail and newsgroup postings with wacky dates, usually far in the future. So apparently this hit many people, though whether or not they realize it is something else altogether.
  • Our Northern Telecom phone system is telling me today is March 1st... :) Anyone else see anything today?
  • My wife went into labor on December 19, and I tried to get her to hold off until January 1. She wasn't interested....
  • The Mayan Calendar is cool. Get ready, because the world's supposed to end when it hits 13.0.0.0.0.
    --
  • Weird :p I was born Jul 8 1980 in the middle of a summer storm. (kidding it was hot as hades in GA)


    I was born in Ga.>:) Athens to be specific.
    Apparently that was a terrible year for weather, snow storms that winter and drought that summer.
    Lots of fun!

    Kintanon
  • At work we suffered from the bug in old Sun JDKs (old is JDK 1.2.1 and JDK 1.3Beta which came out just a couple of months ago). Our applications all gave date ParseExceptions and we had to advance the clocks to March 1.

    Just for the record, our database here at work has also crashed hard and won't seem to come back up. Though I can't say if it's related to the date or not.

    Kintanon
  • Exactly. Someone should have told Casio [casio.com], though. My wristwatch [casio.com] thought today was March 1st. A few fiddly buttonpresses later, and it's back to a more correct world view. I wonder what it will think about tomorrow, though. ;^) (Hmmm, reading that page, I see it actually works as specified...)
  • CNBC reported on the air just a few minutes ago that ATMs were shut down for a while in Japan because of a leap day bug. They also said that although "officials were on the alert" (I didn't write te copy for them) no similar bugs had surfaced in the US.
  • No picture.. It's a standard gold-filled open-face Hamilton Perpetual bankers watch, 18 size, with four small diamonds set into the gold and silver face later. I can't say for sure when it was made, but it was pawned in NYC in December of 1892. (The pawnbroker engraved the ticket number and date inside the watch.) It is keywound, so it may very well be older. Family hairloom; I'm the fifth generation to carry it.
  • Having just played extensivly with it, I am happy to say I have just found the first example of the Y3K bug.. Sadly, during the next millennial rollover, the date changes from '2999' to ' 00; The century dial no longer has enough pre-scribed numerals and is blank. There is enough space on the dial to have another 20 or so centuries, so I'll make sure to have it engraved before then.. ;-)
  • I had it appraised when I had the dial cleaned three years back. While I wasn't told that it was one of their earliest specimins, I was told that my particular model had gone for $14,000 in open auction, and that the guessed value was $6-8K. $6,000 doesn't mean terribly much to me, I'm not materialistic. I was given the watch with the implicit instruction that it be used, as it had been, and I will.
  • If you think that's bad then try this one...

    Run up a copy of Excel 97
    Enter the date 28/02/1900 into cell A1
    Enter the formula +a1+1 into cell A2

    Cell A2 now displays the date 29/02/1900 [an impossible date as 1900 was not a leap year]

    It says a lot about M$ that can't code an event that happened 100 years ago!

    M$ don't know what is going on in the past.
    M$ can't code for the present either.
    I suspect their "forward planning department" is fundamentally unsound also.
  • I'm glad you mentioned that, because I strongly believe that a number of places have had big Y2K problems, but don't want to report them. I remember calling Intuit just after the New Year, while I was placed on hold, they said
    something about experiencing Y2K problems. I didn't see any announcements in the news about Intuit's Y2K problem.


    Hope it wasn't anything serious!

    So, why the secrecy? Why isn't any one 'fessing up to their Y2K problems? Nobody wants the embarrassment, the shame of knowing they've had these problems exposed to the public.


    Well after doing some reading mostly legal problems. When you get a group of people like lawyers together you really start to have a problem quite fast. Suppose that someone depends on Intuit's software in a major way. Now add in the fact that the person is a large company that has very vested interests in said software. That means that Intuit's in the middle of things and needs to act fast. By not telling anyone they are in effect doing what your probably did as kids: break old man Peterson's window just run and hide and dont' fess up.
  • Except that this rule wasn't adopted in 1700.

    Depends which country you're talking about. The calendar was the creation of Pope Gregory XIII in 1582, dropping ten days in October. Catholic countries followed immediately, and Protestant countries by 1700. In Europe, it was only England who had a leap year in 1700. Use of the Gregorian calendar in England (and the colonies) was finally specified by an Act of Parliament in 1751. By then, because of the extra leap year, the correction required 11 days. I believe Russia may not have changed until this century.

    My info is from here [rice.edu] and here [nmsu.edu].

  • Well, I found out today that my watch doesn't handle leap years.... I can't even set it to Feb 29th... have to wait till tomorrow to clock it back and make it right...

    Esperandi
    But I have canned food and a generator, so I'll be okay, right?
  • From the Yahoo report here [yahoo.com]:

    An agency spokesman said the computer glitch was caused by an old program installed in the system.

    It can't have been that old seeing as leap years occur every 4 years IIRC :) Seeing as I don't think that the rules for calculating leap years are particularly complex and probably in any number of libraries this does seem like a particularly shoddy piece of coding.

  • Aaah, Pascal, that brings back happy memories :)

    Alternatively, in Python:

    isleap = (not year%4 and (year%100 or not year%400) > 0
    I really can't be arsed to do an x86 assembler version :)
  • It's usually the case that most programmers quite rightly leave this kind of thing to the underlying OS/platform. Which is fine until that is broken - check out this [sun.com] bug report at Sun (free login reqd). The vanilla 1.2 JVM for Unix was not able to parse "29 Feb 2000" into a Date object due to a very obscure bug introduced in Java2. There is a fix, but I know that at least a few people/companies got caught out.

  • That this is the D-2-9 bug? Or maybe the Y/4 bug?
  • What sort of person would design a system and think that although it wouldn't be used in 2000, it would be used in 1900?
  • Being that this is leapday, all salaried employees are working for free today. So, not only is someone getting overly stressed for this, they are also doing it for no charge whatsoever!
  • by Eccles ( 932 ) on Tuesday February 29, 2000 @05:52AM (#1237997) Journal
    Just for the record, I was born on Feb 29, 1980 in the middle of a massive snowstorm.

    Gee, usually people are conceived during massive snowstorms. (Hey, ya gotta do something...;-)
  • by Amphigory ( 2375 ) on Tuesday February 29, 2000 @05:36AM (#1237998) Homepage
    I admit it... I'm one in a thousand (give or take). When people ask why I act so immature, I usually explain that I just turned seven, so please give me a break. :-)

    OTOH -- I have to say that to blow off Y2K issues at this point is a mistake. The mystique of the rollover was a bunch of nonsense -- and we all knew it. But that doesn't mean that there are no real problems. I have seen quite a few screwed up perl scripts, for example. And it really seems to me that, had we done nothing, some bad things could have happened.

    I'd wait until a few billing cycles are through before I called the problem over.

    --

  • by Bishop ( 4500 ) on Tuesday February 29, 2000 @01:16PM (#1237999)

    Motorola 6800 (HC11: needs ACCD and IDIV) machine language:

    18 EC 00 CE 00 04 03 26 16 18 EC 00 CE 00 64 03
    26 09 18 EC 00 CE 01 90 03 26 04 86 01 20 01 4F
    01

    Store the year in the address (two bytes) pointed to by INDEX Y, The result 1-True/0-False is stored in accumulator A. The two bytes pointed to by INDEX X is used as a scratch area. Run time: 166 clock cycles. (not counting final NOP.)

    Those IDIVs are expensive at 41 cycles each. Is there a better way to do mod?

  • by SgtPepper ( 5548 ) on Tuesday February 29, 2000 @05:15AM (#1238000)
    should have known....the link ended in ".de" *lol*

    Computer breakdowns by intercalary day in Japan

    The intercalary day on today's Tuesday, 29 February, caused some
    surprising computer disturbances in the Hightech country Japan. As
    the press agency Reuters announces, in post offices due to
    Jahr-2000-Fehlern, which were released by the intercalary day, 1200
    cash machines failed. The Japanese weather service has problems with
    the entry of local temperatures and precipitation. According to the
    report 43 stations distributed over the country transmit false data
    since this morning. Already on Monday some 24-Stunden-Vorhersagen
    with an error had been printed out: Instead of " 29. " became " 1. "
    as end of the validity period indicated. In north Japan the devices
    failed for the display of seismic activities with 20 local offices.
    Differently than to the change of year however no breakdowns were
    announced in the Japanese nuclear power stations (cp/c't)
  • by QZS4 ( 7063 ) on Tuesday February 29, 2000 @07:49AM (#1238001) Homepage

    I really can't be arsed to do an x86 assembler version :)

    Will MIPS do? :-)

    la t0,year
    lw t1,0(t0)
    add t5,zero,zero
    andi t2,t1,3
    bnz t2,1f
    addi t5,zero,1
    addi t0,zero,100
    div t1,t0
    mflo t0
    bnz t0,1f
    addi t0,zero,400
    div t1,t0
    mflo t0
    beqz t0,1f
    add t5,zero,zero
    1:
    la t0,isleap
    sw t5,0(t0)

    I could give you sparc, M68k or x86 code also, but this will have to do for now...

  • by szyzyg ( 7313 ) on Tuesday February 29, 2000 @05:44AM (#1238002)
    If you've any interest in calendar manners you'll know that the current 97 leap years in 400 years calendar was introduced by Pope Gregory because the time of the Equinox was slipping away from the date of the equinox - 10 days by the time the calendar was imposed.

    The funny thing is - the 97/400 calendar is in fact inferior to the 8/33 year cycle of the Persian calendar, but for 'political reasons it wasn't introduced. The persian cycle has 7 leap years spaced by 4 years, and one spaced by 5.

    The reason that the Persian Calendar is better is that the 97/100 cycle lets the dae of the equinox wander by about 56 hours. While the Persian calendar lets it wander by only 24....

    Anyway - there's a load of fun political wrangles and a plan by Queen Elisabeth I of Britain to use this better calendar as a secret weapon against the catholic church.... fun fun fun...
  • by Col. Klink (retired) ( 11632 ) on Tuesday February 29, 2000 @05:23AM (#1238003)
    > Correct me if I?m wrong

    Consider yourself corrected.

    Leap years occur when the year is divisible by 4, except when the year is divisible by 100, unless the year is also divisible by *400* (not 1,000).
  • by Detritus ( 11846 ) on Tuesday February 29, 2000 @07:07AM (#1238004) Homepage
    Blame the ancient Romans. They were responsible for setting the number of days in each month to such odd values. Apparently it was a combination of tradition, religion and Emperor's egos. The problem with lunar calendars is the requirement to observe the New Moon, at least in the Muslim and early Jewish calendars.

    The lunar month is approximately 29.53059 days.

  • by PigleT ( 28894 ) on Tuesday February 29, 2000 @06:40AM (#1238005) Homepage
    Check out <a href="http://linuxberg.mirror.ac.uk/">http://linux berg.mirror.ac.uk</a> in Netscrape 4.x for Linux. Look for the big date in red.... doesn't happen in IE, or in Netscrape for non-Linux platforms (Windoze and AIX tested so far). Silly javascript :)
  • by jonathanclark ( 29656 ) on Tuesday February 29, 2000 @11:22AM (#1238006) Homepage

    bissextile year \bye-SEKS-tuhl-YEAR\ (noun)
    : a leap year in the Julian or Gregorian calendar

    The year 2000 is a bissextile year, but the year 1900 was
    not because leap years can only occur in century years that are
    divisible by 400.

    When Julius Caesar reformed the calendar in 45 BC, he
    stipulated that an extra day be added to February every four
    years. But the Romans didn't add the extra day at the end of the
    month; they inserted it after the 24th day of the month. They
    also reckoned days near the end of a month by counting backwards
    from the first of the following month rather than forward from
    the beginning of the current one. The day we call February 24 is
    six days before March 1, so it was known as the sextus, or "sixth
    day." When Caesar's extra day was added, it became a "second
    sextus" or bissextus (appending the Latin "bis," meaning
    "doubled"). English speakers adopted "bissextile" to refer to
    that extra day, even though its placement in the modern calendar
    makes that term a misnomer.

  • by Kintanon ( 65528 ) on Tuesday February 29, 2000 @05:46AM (#1238007) Homepage Journal
    Just for the record, I was born on Feb 29, 1980 in the middle of a massive snowstorm.
    So today is my 5th birthday. Everyone send me a present!

    Kintanon
  • by technos ( 73414 ) on Tuesday February 29, 2000 @06:53AM (#1238008) Homepage Journal
    My 1892 Hamilton perpetual got the date correct. It even rolled over to '2000' for me on New Years. I believe it will keep the correct date until 2199. Amazing to think that the engineer had the foresight to see that someone would still be using it more than 300 years in the future. Perhaps the FORTRAN and RPG programmers of the 1960's should have taken a clue from the watchmakers of the 1890's.

  • by mlesesky ( 81453 ) on Tuesday February 29, 2000 @05:20AM (#1238009)
    I heard a request for birthdays on this day -

    Born on this day:

    1736: Anne Lee , British blacksmith's daughter who emigrated to the USA and founded
    the religious group, the American Society of Shakers.

    1792: Gioacchino Rossini , Italian composer who wrote 36 operas, including The Italian
    Girl in Algiers, William Tell' The Barber of Seville and The Thieving Magpie - and
    invented a number of recipes, notably Tournedos Rossini.

    1840: John Holland , Irish-American

    1896: Ranchhodji Morarji Decal ,Indian prime minister who was imprisoned with Mahatma Gandhi.

    1920: Actress Michele Morgan

    1920: Actor Arthur Franz

    1920: Actor James Mitchell

    1928: Actor Joss Ackland

    1936: Actor Alex Rocco

    1936: Former space shuttle astronaut Jack Lousma

    1944: Actor Dennis Farina

    1944: Actress Phyllis Frelich

    1972: Actor Antonio Sabato Junior
  • by JamesSharman ( 91225 ) on Tuesday February 29, 2000 @05:18AM (#1238010)
    Correct me if I'm wrong but the leap year rules are as follows, leap years occur when the year is divisible by 4, except when the year is divisible by 100 unless the year is divisible by 1000. I find it ironic that programmers have to implement one but not both exceptions to the basic rule in order to have a problem. Those programmers who just implemented the /4 basic rule can rest until 2100 before having problems.
  • by spiralx ( 97066 ) on Tuesday February 29, 2000 @05:46AM (#1238011)

    Actually, try this bit of code instead :)

    isleap = false;
    if !(year % 4) {
    isleap = true;
    year % 100 == 0 ? isleap = false;
    year % 400 == 0 ? isleap = true;
    }

    It's a 400 year exception, not a 1000 year exception...

  • by drnomad ( 99183 ) on Tuesday February 29, 2000 @06:39AM (#1238012)
    I disagree

    Firstly, we need a calendar to identify the seasons. In month X it is summer, in month Y it is winter.

    Secondly, a year doesn't last X months, it lasts 365 days, six hours and a bit.

    Even an earth day doesn't last 24 hours (oh no it don't) it lasts 23 hours 59 minutes and 58 seconds.

    Lastly, they had the leap year wrong a long time. When Christmas started falling in summer, European countries 'invented' the leap year and between 1534 and 1538 all countries in Europe scratched one month, i.e. any date November 1536 does not exist in Holland.

  • As reported in The Scotsman [scotsman.com] today (and e-mailed to me):

    A grandfather is set to fulfil a lifetime's ambition by holding his official 21st birthday party - 63 years after handing out the invitations.

    Martin Grundy was born on February 29 in the leap year of 1916 and so celebrates a proper birthday every four years.

    As a law student in 1937, he held an informal 21st party with a few drinks on February 28 - and told undergraduates to come to the proper party in 2000.

  • by SgtPepper ( 5548 ) on Tuesday February 29, 2000 @05:17AM (#1238014)
    Gotta love Drude [drudgereport.com] this made the headline on DrudgeReport....check it out here [yahoo.com] at yahoo....the report makes more sense in straight english :)
  • by dsplat ( 73054 ) on Tuesday February 29, 2000 @05:43AM (#1238015)
    I remember watching a number programs displaying the date 29 FEB 1990 to me a decade ago. That wasn't a leap year. Fortunately for the vendor, who responded quite quickly, the dates were stored internally in Julian format and converted for display, so no data was corrupted. The bug was introduced during some maintenance on some old software. I suspect that they were among the first to start Y2K fixes.

    This particular problem arose from the fact that far few programmers completely understand the leap year rules [mitre.org], and the code that does the calculations is rarely touched, usually for some reason not directly related to leap year calculations, such as Y2K remediation. It is all wound up in the reasons why software maintenance gets expensive in nearly every case. The specs were either never written down to the level of individual functions, or they are out-of-date. Comments are incomplete or misleading. There's no automated regression tests [c2.com] to give assurance that nothing has been broken.

    Why should we care about this? This particular instance was probably due either to Y2K work or a latent bug from some programmer who over-applied the century portion of the leap year rules. Once it gets fixed, this code won't need to be touched for ages. First of all, Y2K was just a single instance of a justification for going through bodies of code making huge numbers of small changes. Porting is another one. And any programmer with a bit of experience can name at least one or two others.

    Earlier, I provided a link to the description of the Extreme Programming [c2.com] practice of automated unit tests [c2.com]. Doing that might not have caught these bugs before they got loose. Testing generally only catches the bugs you know to look for, and the tests can be wrong too. But I'm lobbying here to try to overcome the natural resistance many programmers feel toward testing. I know I'd certainly rather be writing code. The reason I've started automating it is because I have no such aversion to building tools to take that dull task away from me. Larry Wall pointed out that laziness is a virtue for programmers. Use it.
  • by stevens ( 84346 ) on Tuesday February 29, 2000 @05:17AM (#1238016) Homepage

    A friend of mine's son was born today! Although his wife went in to labor at 3am yesterday, we encouraged her to hold off for 24 hours to deliver just for the cool birthday.

    I don't think she was amused.

    Steve
  • by reality-bytes ( 119275 ) on Tuesday February 29, 2000 @05:35AM (#1238017) Homepage
    It may be the case that there have been many more Y2K problems occur than have actually been reported. It may well be that organizations have tried to cover up to avoid looking like they were the only ones who didn't prepare for the worst.

    It just so happens that the organisation which I work for had at least 20 Y2K related incidents occur in the first week of 2000 but we have all be told to keep quiet (hence I don't give the organisation name) I can say this: we are one of the largest organisations in the UK and we must have done damn well to keep information about these problems away from the trade press.....
  • If you call that a translation...

    The leap-day this Tuesday, brought some surpriseful computer problems to the Hightech country of Japan. As the press agency Reuters informed, 1200 ATMs in Post Offices experimented problems as a result of Y2K related bugs. The Japan Weather Office had trouble gathering temperature and condensation data. As a result, this morning 43 stations distributed all over the country transmitted wrong data. As early as Monday some 24 hour forecasts had mistakes on them: instead of "29" they had "1" as the ending date for the validity of the forecast. In north Japan, in 20 regional offices, the seismic activity display units failed to work. In constrast with the turn of year, there were not reports of breakdowns in Japan's nuclear power plants.

    Disclaimer: I'm not a native English speaker (it shows), and I'm not a native German speaker, but I do think my poor translation is easier to understand than the babelfish one.

  • by stx23 ( 14942 ) on Tuesday February 29, 2000 @05:20AM (#1238019) Homepage Journal
    Here. [bbc.co.uk]
    It's intersting to note they did have problems with Y2K (according to the BBC), so this shouldn't have been *too* much of a surprise...

Say "twenty-three-skiddoo" to logout.

Working...