[comp.sys.mac.misc] What happened in 1904?

rolf@sparc1 (07/13/90)

  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?

omalley@mace.cc.purdue.edu (John O'Malley) (07/13/90)

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.

-John
---
John O'Malley               / Macintosh  / Purdue University / (317)
omalley@mace.cc.purdue.edu / Specialist / Computing Center  / 494-1787

rmh@apple.com (Rick Holzgrafe) (07/17/90)

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! :-)

==========================================================================
Rick Holzgrafe              |    {sun,voder,nsc,mtxinu,dual}!apple!rmh
Software Engineer           | AppleLink HOLZGRAFE1          rmh@apple.com
Apple Computer, Inc.        |  "All opinions expressed are mine, and do
20525 Mariani Ave. MS: 77-A |    not necessarily represent those of my
Cupertino, CA 95014         |        employer, Apple Computer Inc."

jamesth@microsoft.UUCP (James THIELE) (07/17/90)

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

lsr@Apple.COM (Larry Rosenstein) (07/18/90)

In article <55874@microsoft.UUCP> jamesth@microsoft.UUCP (James THIELE) writes:
>
>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? :-)

Have you ever used the Arabic Macintosh system?  The last time I looked at
the Arabic system documentation it described 3 different calendar formats.
(One of which depends on the lattitude & longitude of the user; I believe
the Map cdev originated with the Arabic Macintosh system.)  


-- 
		 Larry Rosenstein,  Object Specialist
 Apple Computer, Inc.  20525 Mariani Ave, MS 46-B  Cupertino, CA 95014
	    AppleLink:Rosenstein1    domain:lsr@Apple.COM
		UUCP:{sun,voder,nsc,decwrl}!apple!lsr

jamesth@microsoft.UUCP (James THIELE) (07/19/90)

In article <9209@goofy.Apple.COM> lsr@Apple.COM (Larry Rosenstein) writes:
>In article <55874@microsoft.UUCP> jamesth@microsoft.UUCP (James THIELE) writes:
|>
|>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? :-)
|
|Have you ever used the Arabic Macintosh system?  The last time I looked at
|the Arabic system documentation it described 3 different calendar formats.
|(One of which depends on the lattitude & longitude of the user; I believe
|the Map cdev originated with the Arabic Macintosh system.)  

No, I don't read Arabic.  I want all these date schemes on my
english version.  :-)

By the way, did you notice the smiley [:-)]?  This was a joke, but
I've already been flamed by some Apple dude via email.

Lighten up, guys.


|-- 
|		 Larry Rosenstein,  Object Specialist
| Apple Computer, Inc.  20525 Mariani Ave, MS 46-B  Cupertino, CA 95014
|	    AppleLink:Rosenstein1    domain:lsr@Apple.COM
|		UUCP:{sun,voder,nsc,decwrl}!apple!lsr