Function: diary-hebrew-yahrzeit

diary-hebrew-yahrzeit is an autoloaded and byte-compiled function defined in cal-hebrew.el.gz.

Signature

(diary-hebrew-yahrzeit DEATH-MONTH DEATH-DAY DEATH-YEAR &optional MARK AFTER-SUNSET)

Documentation

Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before.

Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary entry is assumed to be the name of the person. Although the date of death is specified by the civil calendar, the proper Hebrew calendar Yahrzeit is determined.

If the death occurred after local sunset on the given civil date, the following civil date corresponds to the Hebrew date of death--set the optional parameter AFTER-SUNSET non-nil in this case.

The order of the input parameters changes according to calendar-date-style
(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style).

An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-hebrew.el.gz
;;;###diary-autoload
(defun diary-hebrew-yahrzeit (death-month death-day death-year
                                          &optional mark after-sunset)
  "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before.
Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary
entry is assumed to be the name of the person.  Although the date
of death is specified by the civil calendar, the proper Hebrew
calendar Yahrzeit is determined.

If the death occurred after local sunset on the given civil date,
the following civil date corresponds to the Hebrew date of
death--set the optional parameter AFTER-SUNSET non-nil in this case.

The order of the input parameters changes according to `calendar-date-style'
\(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style).

An optional parameter MARK specifies a face or single-character string to
use when highlighting the day in the calendar."
  (let* ((h-date (calendar-hebrew-from-absolute
                  (+ (calendar-absolute-from-gregorian
                      (diary-make-date death-month death-day death-year))
                     (if after-sunset 1 0))))
         (h-year (calendar-extract-year h-date))
         (d (calendar-absolute-from-gregorian date))
         (yr (calendar-extract-year (calendar-hebrew-from-absolute d)))
         (diff (- yr h-year))
         (y (calendar-hebrew-yahrzeit h-date yr)))
    (if (and (> diff 0) (or (= y d) (= y (1+ d))))
        (cons mark
              (format "Yahrzeit of %s%s: %d%s anniversary"
                      entry
                      (if (= y d) "" " (evening)")
                      diff
                      (diary-ordinal-suffix diff))))))