At 15:55 30-12-96 -0800, you wrote: >Well, I started to join in in the EoT calculation fun, >following Francois Blateyron's original question. I began >by implementing his equations in a spreadsheet, as he did. >I used Microsoft Excel... > >With Robert Sinnott's correction to the longitude of perihelion >calculation, I was getting a close fit, but still not quite >"on". Today, I started to implement Paolo Gregorio's posting >of the algorithm from the Explanatory Supplement. Well, heck, >all I need do is add the necessary offset to Excel's intrinsic >date function (based on 1/1/1900 = 0), and I have Julian Date. >Piece of cake. >Right. > >Until I notice a one day difference from (Excel) calculated >JDate to that from The Dialist's Companion by Bob Terwilliger >and fred Sawyer of NASS. > >Not to be stopped, I grabbed an old copy of the BASIC algorithm >from Sky and Telescope's Astronomical Computing (May 1984), and >coded that in Excel Visual BASIC. Well, *that* date agrees >with the Dialist, so what's wrong with Excel?? > >A little troubleshooting led to the hitherto unknown fact that >1900 really *was* a leap year. At least according to Excel! > >Is this a known bug? Certainly something to be aware of, anyway! >Not to mention that the date computations only support the >range of 1/1/1900 <= D <= 12/31/2078... > >Dave Bell > > Watch out! Yes this is a known bug in Excel. I had a long discussion with Microsoft about it. They didn't think it worth mentioning because only people like us have difficulties with it. Excel is starting to count at 0 Jan 1900. So day 1 (not 0) is 01 Jan 1900. Check which date day 60 is. You can do that by putting 60 in a cell and format this cell as representing ddmmyyyy. You run the risk that you will see 29Feb1900, which is a non existing date (1900 was not a leapyear, 2000 is!). You can avoid this bug by using the so called 1904 date system. This option in Excel can be found under Tools Options. In that case Excel starts counting at 0 jan 1904, so you have to add a number of days to get the proper Julian day: 4*365=1460 days. Another difficulty is that in Excel the daynumber changes at modnight, 00:00 hrs. A Julian day number changes at midday Greenwichtime, so at 12:00 hrs.GMT. Thibaud Taudin-Chabot <[EMAIL PROTECTED]>
