JULDAY Confusion
QUESTION: According to Jean Meeus in his book Astronomical Algorithms, the Julian day number for 1 January 1999 should be 2451179.5. But when I use the IDL routine JULDAY to calculate this number I get something different:
IDL> Print, JULDAY(1, 1, 1999)
2451180
Which of these numbers is correct?
![]()
ANSWER: I guess we could debate the deeper meaning of the word “correct” in this context, but I think the bottom line is that both are correct! But, wait, you say. Doesn't this cause, like uh, a lot of confusion!? You betcha, as they say in Minnesota, where my oldest son has just taken up residence.
The problem here is that Julian day numbers are used in two different contexts. Sometimes people want to know the Julian day number associated with a particular date, and sometimes people want to know the Julian day number associated with a particular time (in the past or future). I like to think of these two values as the naive Julian day number and the astronomical Julian day number. If you specify just a year, month, and day in the JULDAY function, you will be returned the naive Julian day number. This will correspond to your notion (assuming you are not Jewish) of a day that starts at midnight. (If you are Jewish, your day starts at sundown and you will have to user your own version of a Julian day number.) If you additionally specify the hour, minute, and second to the JULDAY function you are clearly obsessed with time and are probably an astronomer, so JULDAY returns the astronomical Julian day number, which is the number Meeus was referring to.
IDL> Print, JULDAY(1, 1, 1999, 0, 0, 0)
2451179.5
The astronomical Julian day number day starts at noon, so this number is half a day behind the calendar day, which starts at midnight. The astronomers did this so that when they were observing at night they would only have one day to think about. (Unless of course, you are observing in the vicinity of Australia, but there weren't any Australian astronomers on the committee when this decision was made.)
Mark Hadfield has written an interesting article on this subject. He has links to other references, but I would pay particular attention to the Julian Day Number Meaning article by Peter Meyer. It is most informative.
The bottom line is that if you are interested in locating a heavenly body in time and space, you should be prepared to use the astronomical Julian day number, which will require that you always specify an hour, minute, or second in addition to the year, month, and day in the JULDAY call. This is NOT obvious from the JULDAY documentation and will cause you a lot of grief and confusion if you forget it.
![]()
Copyright © 2006 David W. Fanning
Last Updated 26 May 2006