Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!jamesth From: jamesth@microsoft.UUCP (James THIELE) Newsgroups: comp.sys.mac.misc Subject: Re: What happened in 1904? Message-ID: <55874@microsoft.UUCP> Date: 17 Jul 90 15:40:18 GMT References: <1990Jul13.131831.26890@ux1.cso.uiuc.edu> <5099@mace.cc.purdue.edu> <9151@goofy.Apple.COM> Reply-To: jamesth@microsoft.UUCP (James THIELE) Organization: Microsoft Corp., Redmond WA Lines: 49 In article <9151@goofy.Apple.COM> rmh@apple.com (Rick Holzgrafe) writes: >In article <5099@mace.cc.purdue.edu> omalley@mace.cc.purdue.edu (John >O'Malley) writes: >> In article <1990Jul13.131831.26890@ux1.cso.uiuc.edu> rolf@sparc1 writes: || | || | You probably have noticed that if your battery gets removed, or the || |PRAM gets zapped that you get some files with dates in 1904. I heard || |a LONG time ago that there was a joke of some sort behind this. || | Anybody know it? || || The year 1900, despite the fact that it is evenly divisible by 4, was || not a leap year. 1904 was a leap year. || || I thought I heard that Apple didn't wanna bother programming in that || exception, so they had the clock start in 1904 instead of 1900. | |That's probably correct. Figure it this way: the Mac stores the |date-and-time as a count of seconds in an unsigned 32-bit integer. That |gives you a range of zero to (a little more than) 4 billion seconds. |That's a range of (a little more than) 135 years. | |OK, what years should we cover? How about all of this century, and 35 or |40 years of the next? That should mean that all our users, young and old, |can deal with nearly all the dates within their lifetimes. OK then, 1900 - |2035 or so. | |Then, as John suggested, the programmer speaks up and says "The |day-of-the-week calculations get real easy if the first year is a leap |year. 1900 wasn't. How about if we start in 1904?" Everyone agrees, and |the final range becomes 1904-2040. | |Well, I have no idea if it was really like that. But I thought this |through while writing a calendar-page app recently, and it makes sense. |And there's no joke here, unless you think the Julian calendar itself is a |bit of a giggle. (Ever checked out September, 1752? I'll bet the |programmer was glad he didn't have to cover *that* one! :-) | The problem is even stickier if you consider localization. Not all European countries changed to the Gregorian calendar in 1752 - the Soviet Union (aka Russia) change until after the Bolshevik Revolution, so 1900 *was* a leap year in Czarist Russia. But Apple *really* punted on localization by not including Moslem, Jewish, Japanese, Mayan and so on calendars as options. Why shouldn't there be a control panel option to choose which system to show dates in? :-) James Thiele -- microsoft!jamesth Standard Disclaimer