Function: calendar-hebrew-to-absolute

calendar-hebrew-to-absolute is a byte-compiled function defined in cal-hebrew.el.gz.

Signature

(calendar-hebrew-to-absolute DATE)

Documentation

Absolute date of Hebrew DATE.

The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-hebrew.el.gz
(defun calendar-hebrew-to-absolute (date)
  "Absolute date of Hebrew DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC."
  (let ((month (calendar-extract-month date))
        (day (calendar-extract-day date))
        (year (calendar-extract-year date)))
    (+ day                              ; days so far this month
       (if (< month 7)                  ; before Tishri
           ;; Then add days in prior months this year before and after Nisan.
           (+ (calendar-sum
               m 7 (<= m (calendar-hebrew-last-month-of-year year))
               (calendar-hebrew-last-day-of-month m year))
              (calendar-sum
               m 1 (< m month)
               (calendar-hebrew-last-day-of-month m year)))
         ;; Else add days in prior months this year.
         (calendar-sum
          m 7 (< m month)
          (calendar-hebrew-last-day-of-month m year)))
       (calendar-hebrew-elapsed-days year) ; days in prior years
       -1373429)))               ; days elapsed before absolute date 1