JULDAY returns wrong result for 01.01.1981 00:00.0
Status: Beta
Brought to you by:
m_schellens
Description
Function JULDAY returns incorrect Julian day for 01.01.1981, 01.01.1985, 01.01.1989... that's it, for Jan 1 of the first year after a leap year. Did not investigate further but I suppose it could be wrong for other days also.
Reason
Function ceil instead of floor is used in Julian day calculation formula in function bool dateToJD(...) in the file basic_pro.cpp.
How to reproduce
Execute:
GDL> print, julday(1, 1, 1981, 0)
Expected output:
2444605.5
Actual output:
2444604.5
How to fix
Replace ceil with floor. Diff-file is attached. Also the hack fixing value of variable jd "//for some obscure reason" is not needed anymore. Fixed it also.
thanks, I'll implement the patch asap.