Function: calendar-julian-to-absolute

calendar-julian-to-absolute is an autoloaded and byte-compiled function defined in cal-julian.el.gz.

Signature

(calendar-julian-to-absolute DATE)

Documentation

The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.

The Gregorian date Sunday, December 31, 1 BC is imaginary.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-julian.el.gz
(defun calendar-julian-to-absolute (date)
  "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.
The Gregorian date Sunday, December 31, 1 BC is imaginary."
  (let ((month (calendar-extract-month date))
        (year (calendar-extract-year date)))
    (+ (calendar-day-number date)
       (if (and (zerop (% year 100))
                (not (zerop (% year 400)))
                (> month 2))
           1 0)       ; correct for Julian but not Gregorian leap year
       (* 365 (1- year))
       (/ (1- year) 4)
       -2)))