Philip Newton (pne) wrote,
Philip Newton

  • Mood:

Let's just assume that Microsoft programmers are idiots

In an article on OpenDocument and Microsoft's Open XML, Bill Poser says that:

Open XML does not follow ISO 8601, the standard for representation of dates and times. Why? Because whoever wrote the code for computing dates in a Microsoft product long ago did not know that 1900 was not a leap year. (Years divisible by 100 are not leap years unless they are divisible by 400.) Open XML requires conforming implementations to replicate this Microsoft bug forever.

On the other hand, I once read a different story which went roughly like this:

  • Excel treats 1900 as a leap year because it's done so since the first version, and can't change that now due to compatibility concerns with people who've come to depend on that behaviour (perhaps because they rely on it for reasons of their own or even just because they have code which specifically works around the behaviour).
  • Excel treated 1900 as a leap year in the first version because Lotus 1-2-3 did so, and they wanted to be as compatible as possible with that software, in order to encourage people to migrate (different behaviour would have meant that some people couldn't transfer over formulas or macros without examining them in detail to see whether the changed behaviour would affect the results).
  • Lotus 1-2-3 treated 1900 as a leap year because it was written for computers with not much memory, and since just using the "divisible by four" rule was good enough for 1901–2099, they just used that.

I may have got the programs wrong; for example, Excel might have inherited the behaviour from VisiCalc, directly or via MultiPlan, rather than from 1-2-3, but at any rate, the story I read is that the behaviour was not specifically planned from scratch at Microsoft.

I don't know whether it's true, but it certainly sounds plausible to me.

But no, let's just assume that Microsoft programmers are incompetent and did not know that 1900 was not a leap year instead. Because after all, we love to hate Microsoft.

(And besides, doesn't ISO 8601 only specify the format in which to output dates and not how to calculate whether a given year is a leap year or not? Does the ISO standard specifically forbid outputting something like "1900-02-29T12:34:56"?)

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded