From: Ed Reingold Date: Mon, 7 Mar 2011 07:48:32 +0000 (-0800) Subject: cal-hebrew addition from bug#8190. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~655 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e63e9234d012ed8ac10e32d3b2a0e1539b5685d0;p=emacs.git cal-hebrew addition from bug#8190. * lisp/calendar/cal-hebrew.el (diary-hebrew-yahrzeit): Add optional `after-sunset' argument. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38d9283f748..d8559182c5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-07 Ed Reingold + + * calendar/cal-hebrew.el (diary-hebrew-yahrzeit): + Add optional `after-sunset' argument. (Bug#8190) + 2011-03-07 Aaron S. Hawley * play/morse.el (nato-alphabet, nato-region, denato-region): diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 63e7484e127..e5373a28756 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -879,21 +879,27 @@ use when highlighting the day in the calendar." (declare-function diary-ordinal-suffix "diary-lib" (n)) ;;;###diary-autoload -(defun diary-hebrew-yahrzeit (death-month death-day death-year &optional mark) +(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)))) + (+ (calendar-absolute-from-gregorian + (diary-make-date death-month death-day death-year)) + (if after-sunset 1 0)))) (h-month (calendar-extract-month h-date)) (h-day (calendar-extract-day h-date)) (h-year (calendar-extract-year h-date))