GNU bug report logs -
#8190
Minor improvement for diary-yahrzeit
Previous Next
Reported by: Edward Reingold <reingold <at> iit.edu>
Date: Sun, 6 Mar 2011 19:59:02 UTC
Severity: wishlist
Tags: patch
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8190 in the body.
You can then email your comments to 8190 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#8190
; Package
emacs
.
(Sun, 06 Mar 2011 19:59:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Edward Reingold <reingold <at> iit.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 06 Mar 2011 19:59:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The code below includes the one day correction needed if the death is
after local sunset. This change makes the code parallel to the code
for diary-hebrew-birthday that I sent last week.
(defun diary-yahrzeit
(death-month death-day death-year &optional 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. Date of death is on the *civil* calendar;
although the date of death is specified by the civil calendar, the proper
Hebrew calendar yahrzeit is determined. NOTE: If the death occurred after
local sunset on the given civil date, the following civil date corresponds to
the Hebrew date of death--the optional parameter AFTER-SUNSET does this
correction when t. If `european-calendar-style' is t, the order of the
parameters is changed to DEATH-DAY, DEATH-MONTH, DEATH-YEAR."
(let* ((h-date (calendar-hebrew-from-absolute
(+ (calendar-absolute-from-gregorian
(if european-calendar-style
(list death-day death-month death-year)
(list death-month death-day death-year)))
(if after-sunset 1 0))))
(h-month (extract-calendar-month h-date))
(h-day (extract-calendar-day h-date))
(h-year (extract-calendar-year h-date))
(d (calendar-absolute-from-gregorian date))
(yr (extract-calendar-year (calendar-hebrew-from-absolute d)))
(diff (- yr h-year))
(y (hebrew-calendar-yahrzeit h-date yr)))
(if (and (> diff 0) (or (= y d) (= y (1+ d))))
(format "Yahrzeit of %s%s: %d%s anniversary"
entry
(if (= y d) "" " (evening)")
diff
(cond ((= (% diff 10) 1) "st")
((= (% diff 10) 2) "nd")
((= (% diff 10) 3) "rd")
(t "th"))))))
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Mon, 07 Mar 2011 07:48:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Edward Reingold <reingold <at> iit.edu>
:
bug acknowledged by developer.
(Mon, 07 Mar 2011 07:48:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 8190-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.1
Applied; thanks.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 04 Apr 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.