Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!fernwood!portal!cup.portal.com!J_Otto_Tennant From: J_Otto_Tennant@cup.portal.com Newsgroups: comp.misc Subject: Julian day numbers Message-ID: <41601@cup.portal.com> Date: 24 Apr 91 03:06:43 GMT Organization: The Portal System (TM) Lines: 29 In the introductory chapter of _Numerical_Recipies_, programs are presented for the calculation of the Julian day number given a date in the form of month/day/year, and vice-versa. The key trick, as described in a recent article in "Dr. Dobb's", is to renumber months so that February is last. Given that wonderful hack (which numbers March as "4" and February as "15"), the next step is given as: JULDAY = INT(365.25*JY)+INT(30.6001*JM)+ID+1720995 The "magic number" 365.25 is easy to understand. The magic number 1720995 can be figured out (given the renumbering of the months.) The number 30.6001 is somewhat less easy to understand. From my point of view, there are two aspects to the incomprehensibility of 30.6001. First, why is the constant 30.6001? JM ranges from 4 to 15. If we view the constant 30.6001 as (30.6 + 0.0001), the 0.0001 term is completely irrelevant to the calculation. Why, in a book as careful and accurate as _Numerical_Recipies_ would there be such an irrelevant part of a constant? Second, "30.6" works. Empirically, there are only 12 cases, and the cases work. Was this number derived empirically? Did the authors, or possibly Zellar, just fiddle with constants until one worked? ("30.59_" does not work, by the way.) Or is there some derivation of the number?