aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Reingold2011-03-06 23:48:32 -0800
committerGlenn Morris2011-03-06 23:48:32 -0800
commite63e9234d012ed8ac10e32d3b2a0e1539b5685d0 (patch)
tree4a09237dd34858337db3d1791fc36575115cc8d1
parent5b3e6db8d56f100f82cdf3587fdef16425bf403d (diff)
downloademacs-e63e9234d012ed8ac10e32d3b2a0e1539b5685d0.tar.gz
emacs-e63e9234d012ed8ac10e32d3b2a0e1539b5685d0.zip
cal-hebrew addition from bug#8190.
* lisp/calendar/cal-hebrew.el (diary-hebrew-yahrzeit): Add optional `after-sunset' argument.
-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 @@
12011-03-07 Ed Reingold <reingold@emr.cs.iit.edu>
2
3 * calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
4 Add optional `after-sunset' argument. (Bug#8190)
5
12011-03-07 Aaron S. Hawley <aaron.s.hawley@gmail.com> 62011-03-07 Aaron S. Hawley <aaron.s.hawley@gmail.com>
2 7
3 * play/morse.el (nato-alphabet, nato-region, denato-region): 8 * 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."
879(declare-function diary-ordinal-suffix "diary-lib" (n)) 879(declare-function diary-ordinal-suffix "diary-lib" (n))
880 880
881;;;###diary-autoload 881;;;###diary-autoload
882(defun diary-hebrew-yahrzeit (death-month death-day death-year &optional mark) 882(defun diary-hebrew-yahrzeit (death-month death-day death-year
883 &optional mark after-sunset)
883 "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before. 884 "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before.
884Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary 885Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary
885entry is assumed to be the name of the person. Although the date 886entry is assumed to be the name of the person. Although the date
886of death is specified by the civil calendar, the proper Hebrew 887of death is specified by the civil calendar, the proper Hebrew
887calendar Yahrzeit is determined. 888calendar Yahrzeit is determined.
888 889
890If the death occurred after local sunset on the given civil date,
891the following civil date corresponds to the Hebrew date of
892death--set the optional parameter AFTER-SUNSET non-nil in this case.
893
889The order of the input parameters changes according to `calendar-date-style' 894The order of the input parameters changes according to `calendar-date-style'
890\(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style). 895\(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style).
891 896
892An optional parameter MARK specifies a face or single-character string to 897An optional parameter MARK specifies a face or single-character string to
893use when highlighting the day in the calendar." 898use when highlighting the day in the calendar."
894 (let* ((h-date (calendar-hebrew-from-absolute 899 (let* ((h-date (calendar-hebrew-from-absolute
895 (calendar-absolute-from-gregorian 900 (+ (calendar-absolute-from-gregorian
896 (diary-make-date death-month death-day death-year)))) 901 (diary-make-date death-month death-day death-year))
902 (if after-sunset 1 0))))
897 (h-month (calendar-extract-month h-date)) 903 (h-month (calendar-extract-month h-date))
898 (h-day (calendar-extract-day h-date)) 904 (h-day (calendar-extract-day h-date))
899 (h-year (calendar-extract-year h-date)) 905 (h-year (calendar-extract-year h-date))