NavList:
A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
From: Paul Hirose
Date: 2025 Sep 20, 13:59 -0700
The Julian date formula from Copilot, as posted by Jim Hickey:
JD = 367*Y - INT((7*(Y + INT((M + 9)/12)))/4) + INT((275*M)/9) + D + 1721013.5 + UT/24
It's valid 1901-2099, but fails outside those years. For instance, at 1900-01-01 12 h the correct JD is 2415021 per the Astronomical Almanac:
https://archive.org/details/binder1_202003/page/n541/mode/1up?view=theater
But the formula gives 2415020. It also fails at 2100-03-01.
The Meeus algorithm posted by Alexandre Eremenko gives correct results 1800 - 2200. I tested the first and last day of every month in those years, which are a complete Gregorian calendar cycle of 400 years plus one.
The Julian date algorithm I posted 2024-03-20 passes the test too, as does the JulianDate class in my SofaJpl astronomical DLL.
--
Paul Hirose
sofajpl.com






