summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calendar/cal-hebrew.el12
2 files changed, 14 insertions, 3 deletions
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 <reingold@emr.cs.iit.edu>
+
+ * calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
+ Add optional `after-sunset' argument. (Bug#8190)
+
2011-03-07 Aaron S. Hawley <aaron.s.hawley@gmail.com>
* 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))