edt@caen.engin.umich.edu (Eric Taylor) (09/06/89)
I have a question.... From MS Excel User's Guide v 1.03 for the Mac: Excel stores dates and times as serial numbers from 0 to 49710, where 0 is the number for January 1, 1904, and 49710 is the number for February 6, 2040. Times are stored as decimal fractions. For example, the serial number for noon on 6/1/85 is 29735.5. You can see a date's serial number in the forumla bar by formatting the cell containing the date with general format. Why 1904? I don't see why they chose that year rather than 1900 (which makes a little sense), or ibmpcs which have 1980 (the birth of the pc's) as the start date.
mnkonar@yaya.SRC.Honeywell.COM (Murat N. Konar) (09/07/89)
In article <457a7553.1285f@maize.engin.umich.edu> edt@caen.engin.umich.edu () writes:
-Excel stores dates and times as serial numbers from 0 to 49710, where
-0 is the number for January 1, 1904, and 49710 is the number for February 6,
[stuff deleted]
-Why 1904? I don't see why they chose that year rather than 1900 (which makes
-a little sense), or ibmpcs which have 1980 (the birth of the pc's) as
-the start date.
January 1, 1904 is the earliest date that the Mac OS will represent. I'm not
sure why or how this date was chosen. It is curious though, isn't it?
____________________________________________________________________
Have a day. :^|
Murat N. Konar Honeywell Systems & Research Center, Camden, MN
mnkonar@SRC.honeywell.com (internet) {umn-cs,ems,bthpyd}!srcsip!mnkonar(UUCP)
kessler%cons.utah.edu@wasatch.utah.edu (Robert R. Kessler) (09/07/89)
In article <30291@srcsip.UUCP> mnkonar@src.honeywell.com (Murat N. Konar) writes: >In article <457a7553.1285f@maize.engin.umich.edu> edt@caen.engin.umich.edu () writes: >-Excel stores dates and times as serial numbers from 0 to 49710, where >-0 is the number for January 1, 1904, and 49710 is the number for February 6, >[stuff deleted] >-Why 1904? I don't see why they chose that year rather than 1900 (which makes My guess is that January 1900 is special, because of it being a leap year, which would add a day in February, but since it is not a multiple of 400 years, then the day is taken away, so it isn't really a leap year. The year 2000 will be a leap year (aren't we lucky that we won't have to rewrite all that date software for the year 2000 ;-). So, you don't have to special case the software to know about centuries that aren't multiples of 400. I suspect that it will think Feb 29, 2100 is a legal date (just a guess). B.
russotto@wam.UMD.EDU (09/07/89)
In article <457a7553.1285f@maize.engin.umich.edu> edt@caen.engin.umich.edu () writes: >I have a question.... > >From MS Excel User's Guide v 1.03 for the Mac: > >Excel stores dates and times as serial numbers from 0 to 49710, where >0 is the number for January 1, 1904, and 49710 is the number for February 6, > >Why 1904? I don't see why they chose that year rather than 1900 (which makes >a little sense), or ibmpcs which have 1980 (the birth of the pc's) as >the start date. The easy answer is that the Mac OS does it from 1904. The deeper reason for it, though, is that there is an easier leap year rule for dates starting in 1904 and going to a date < 2100. That is, for those dates, a leap year is any year divisible by 4. If you include 1900, a leap year is any year divisible by four that is either not divisible by 100, or is divisible by 400. -- DISCLAIMER: Not only does the University not share my opinions, they don't want me sharing my opinions. "This 'Pnews', what does it do?" Matthew T. Russotto russotto@wam.umd.edu
jeremyr@cs.qmc.ac.uk (Jeremy Roussak) (09/07/89)
The reason the Mac OS chooses 1904 as its first year may have something to do with the fact that 1900, although divisible by 4, was not a leap year. The next year satisfying those two criteria is 2100, so it could be that not checking for this saved a few bytes of code... Just a thought. Jeremy Roussak
landman%hanami@Sun.COM (Howard A. Landman x61391) (09/08/89)
In article <30291@srcsip.UUCP> mnkonar@src.honeywell.com (Murat N. Konar) writes: >January 1, 1904 is the earliest date that the Mac OS will represent. I'm not >sure why or how this date was chosen. It is curious though, isn't it? Curious isn't the word. #@(%!*8 inconvenient is more like it. A couple of extra bits and they could have gone back to the founding of the Gregorian calendar, which would have saved me a lot of pain in dealing with dates in one of my Hypercard stacks. The events I'm tracking go back to the early 1700's, and there are *lots* of them between 1850 and 1900. So in order to be able to sort by date, I have to specify dates as YYYY-MM-DD and do an alpha sort, and write special code to convert those dates to other formats. Howard A. Landman landman@sun.com
geoff@pmafire.UUCP (Geoff Allen) (09/08/89)
In article <8909061947.AA00416@vs04csc.UMD.EDU> russotto@wam.UMD.EDU writes: >There is an easier leap year rule for dates >starting in 1904 and going to a date < 2100. That is, for those >dates, a leap year is any year divisible by 4. If you include 1900, >a leap year is any year divisible by four that is either not divisible >by 100, or is divisible by 400. OK, so why start with 1904? Why not 1901? -- Geoff Allen - WINCO Computer Process Engineering {uunet,bigtex}!pmafire!geoff <or> ucdavis!egg-id!pmafire!geoff Disclaimer: WINCO doesn't believe in Macs, so of course these are my views.
kent@sunfs3.camex.uucp (Kent Borg) (09/08/89)
In article <3270@wasatch.utah.edu> kessler%cons.utah.edu@wasatch.utah.edu (Robert R. Kessler) writes: [About people wondering why the Macintosh thinks the beginning of time is Jan 1, 1904, and that it makes leap year computing easier.] >So, you don't have to special case the software to know about >centuries that aren't multiples of 400. I suspect that it will >think Feb 29, 2100 is a legal date (just a guess). Nope. A longint of seconds starting at the beginning of 1904 runs out in early February of 2040. It won't make it to Feb 2100 on the original scheme. Speaking of what original scheme can't do, the 7.0 Script Manager (and I think the current Script Manager too) has a LongDateTime which is a 64-bit signed ("SANE Comp format") number. It has a range of about 500-billion years, centered around Jan 1, 1904 still. That should last us a little longer. -- Kent Borg "You know me, bright ideas kent@lloyd.uucp just pop into my head!" or -Mrs Lovett ...!husc6!lloyd!kent (from Stephen Sondheim's "Sweeny Todd")
long@rainbo.enet.dec.com (Richard Long) (09/10/89)
>In article <3270@wasatch.utah.edu> kessler%cons.utah.edu@wasatch.utah.edu (Robert R. Kessler) writes: > >[About people wondering why the Macintosh thinks the beginning of time >is Jan 1, 1904, and that it makes leap year computing easier.] > According to a blurb I read recently, that date was picked because it was a Sunday, thus making : Remainder_Of (#days since 1904-date / 7) equal to the day of the week, where Monday = 1, etc. HiH, Rich --- Disclaimer: I speak for myself only, but you can listen! >>>>>>>>>>>>>Paths to me: long@mcntsh.enet.dec.com --or-- /~~) /~~ / ...!decwrl!mcntsh.enet.dec.com!long --or-- /~~\ /__ /__ long%mcntsh.dec@decwrl.enet.dec.com