pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
[personal profile] pne

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"?)

Date: Sunday, 21 January 2007 17:03 (UTC)
From: [identity profile] deflatermouse.livejournal.com
I heard that story first in a Joel on Software article (http://www.joelonsoftware.com/items/2006/06/16.html) which may be your source.

Date: Sunday, 21 January 2007 17:21 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
Reading through that, that was almost certainly my source, though I didn't remember it specifically. Thanks!

(And I'm glad that I remembered the reference to Lotus 1-2-3 correctly.)

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Thursday, 1 January 2026 20:29
Powered by Dreamwidth Studios