?

Log in

No account? Create an account
Oh no ... - Off in the distance
browse
my journal
links
May 2016
 

The Bellinghman
Date: 2010-03-02 12:56
Subject: Oh no ...
Security: Public
The firm said that the fault had been caused by machines that had "recognised the year 2010 as a leap year".

Just how many incompetent programmers are there out there?

(I mean, I know there are different calendars in effect around the world, and that we'll only know whether the former Soviet Union is on the Gregorian or the Modified Julian system when we see whether they observe 2800 as a leap year. But I don't think anyone anywhere has every considered this year to have a 29th of February.)
Post A Comment | 17 Comments | | Link






Dr Plokta
User: drplokta
Date: 2010-03-02 13:05 (UTC)
Subject: (no subject)
The algorithm "Years ending in zero are leap years" worked fine for every date from 1991 (which was before the original PlayStation was launched) up to last weekend. It may have been ancient crufty code from the mid nineties that no one expected to still be in use fifteen years later.
Reply | Thread | Link



The Bellinghman
User: bellinghman
Date: 2010-03-02 13:16 (UTC)
Subject: (no subject)
It's a pig-awful algorithm because, if you're looking only at the last digit, then you've already got problems with (say) 1998 and 2008.

(I can accept the simple 'divide by 4' algorithm because that one works for 1901 through to 2099, which is a reasonably long period that we might well have calendar reform before its end.)
Reply | Parent | Thread | Link



Alex McLintock
User: alexmc
Date: 2010-03-02 15:13 (UTC)
Subject: (no subject)
Is there a standard library which can perform this algorithm for me?
Reply | Parent | Thread | Link



The Bellinghman
User: bellinghman
Date: 2010-03-02 15:18 (UTC)
Subject: (no subject)
I'm wondering if there's a standard library that doesn't.
Reply | Parent | Thread | Link