There are other day number systems more common than the emacs "absolute" day number -- the "astro" or Julian day number and the proleptic Gregorian system used by sqlite3 e.g. select julianday("-4713-11-24"). cal-julian.el:alendar-astro-to-absolute refers to "astro". Proleptic Gregorian day 0 = November 24, 4714 BC while "astro" day 0 = January 1, 4713 BC. I'm attaching julian.lisp which has calendar-correlate-from-date and calendar-correlate-from-julianday may help with days before 1582. These are based on Peter Duffett-Smiths calculations.