Julian date functions mess

Original Reporter info from Mantis:
  • Reporter name:

Description:

Whoever coded Julian date related functions, demonstrate complete ignorance about the matter.

Unfortunately, I used Delphi based Julian date translation functions for some on-line astronomical calculations and after conversion to Lazarus, program apparently stopped to work properly.

For instance, JulianDateToDateTime in FPC would returns only noon or midnight, as TryJulianDateToDateTime completely cut off fractions of the day.

As well, similar algorithms does not handle dates before establishing Gregorian calendar. For proper handling, look for instance algorithm used in Patrick Chevalley's SkyChart:

https://sourceforge.net/p/skychart/code/HEAD/tree/trunk/skychart/component/jdcalendar/jdcalendar.pas

After 20 years of development I would expect the most of such basic bugs are cleaned up.

Mantis conversion info:

  • Mantis ID: 31833
  • Version: 3.0.2
  • Fixed in version: 3.1.1
  • Fixed in revision: 36406 (#7f2d53dc)
  • Target version: 3.0.4