diff options
author | Ed Reingold <reingold@emr.cs.iit.edu> | 2011-03-06 23:48:32 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-03-06 23:48:32 -0800 |
commit | e63e9234d012ed8ac10e32d3b2a0e1539b5685d0 (patch) | |
tree | 4a09237dd34858337db3d1791fc36575115cc8d1 /lisp/calendar/cal-hebrew.el | |
parent | 5b3e6db8d56f100f82cdf3587fdef16425bf403d (diff) | |
download | emacs-e63e9234d012ed8ac10e32d3b2a0e1539b5685d0.tar.gz |
cal-hebrew addition from bug#8190.
* lisp/calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
Add optional `after-sunset' argument.
Diffstat (limited to 'lisp/calendar/cal-hebrew.el')
-rw-r--r-- | lisp/calendar/cal-hebrew.el | 12 |
1 files changed, 9 insertions, 3 deletions
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)) |