Function: calendar-hebrew-yahrzeit

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

Signature

(calendar-hebrew-yahrzeit DEATH-DATE YEAR)

Documentation

Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-hebrew.el.gz
(defun calendar-hebrew-yahrzeit (death-date year)
  "Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR."
  (let ((death-day (calendar-extract-day death-date))
        (death-month (calendar-extract-month death-date))
        (death-year (calendar-extract-year death-date)))
    (cond
     ;; If it's Heshvan 30 it depends on the first anniversary; if
     ;; that was not Heshvan 30, use the day before Kislev 1.
     ((and (= death-month 8)
           (= death-day 30)
           (not (calendar-hebrew-long-heshvan-p (1+ death-year))))
      (1- (calendar-hebrew-to-absolute (list 9 1 year))))
     ;; If it's Kislev 30 it depends on the first anniversary; if that
     ;; was not Kislev 30, use the day before Teveth 1.
     ((and (= death-month 9)
           (= death-day 30)
           (calendar-hebrew-short-kislev-p (1+ death-year)))
      (1- (calendar-hebrew-to-absolute (list 10 1 year))))
     ;; If it's Adar II, use the same day in last month of year (Adar
     ;; or Adar II).
     ((= death-month 13)
      (calendar-hebrew-to-absolute
       (list (calendar-hebrew-last-month-of-year year) death-day year)))
     ;; If it's the 30th in Adar I and year is not a leap year (so
     ;; Adar has only 29 days), use the last day in Shevat.
     ((and (= death-day 30)
           (= death-month 12)
           (not (calendar-hebrew-leap-year-p year)))
      (calendar-hebrew-to-absolute (list 11 30 year)))
     ;; In all other cases, use the normal anniversary of the date of death.
     (t (calendar-hebrew-to-absolute
         (list death-month death-day year))))))