emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r103573: cal-hebrew addition from bug


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103573: cal-hebrew addition from bug#8190.
Date: Sun, 06 Mar 2011 23:48:32 -0800
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103573
author: Ed Reingold <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2011-03-06 23:48:32 -0800
message:
  cal-hebrew addition from bug#8190.
  
  * lisp/calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
  Add optional `after-sunset' argument.
modified:
  lisp/ChangeLog
  lisp/calendar/cal-hebrew.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-07 07:35:25 +0000
+++ b/lisp/ChangeLog    2011-03-07 07:48:32 +0000
@@ -1,3 +1,8 @@
+2011-03-07  Ed Reingold  <address@hidden>
+
+       * calendar/cal-hebrew.el (diary-hebrew-yahrzeit):
+       Add optional `after-sunset' argument.  (Bug#8190)
+
 2011-03-07  Aaron S. Hawley  <address@hidden>
 
        * play/morse.el (nato-alphabet, nato-region, denato-region):

=== modified file 'lisp/calendar/cal-hebrew.el'
--- a/lisp/calendar/cal-hebrew.el       2011-03-01 03:53:18 +0000
+++ b/lisp/calendar/cal-hebrew.el       2011-03-07 07:48:32 +0000
@@ -879,21 +879,27 @@
 (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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]