Function: org-bbdb-anniversary-description

org-bbdb-anniversary-description is a byte-compiled function defined in ol-bbdb.el.gz.

Signature

(org-bbdb-anniversary-description AGENDA-DATE ANNIV-DATE)

Documentation

Return a string used to incorporate into an agenda anniversary entry.

The calculation of the anniversary description string is based on the difference between the anniversary date, given as ANNIV-DATE, and the date on which the entry appears in the agenda, given as AGENDA-DATE. This makes it possible to have different entries for the same event depending on if it occurs in the next few days or far away in the future.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ol-bbdb.el.gz
(defun org-bbdb-anniversary-description (agenda-date anniv-date)
  "Return a string used to incorporate into an agenda anniversary entry.
The calculation of the anniversary description string is based on
the difference between the anniversary date, given as ANNIV-DATE,
and the date on which the entry appears in the agenda, given as
AGENDA-DATE.  This makes it possible to have different entries
for the same event depending on if it occurs in the next few days
or far away in the future."
  (let ((delta (- (calendar-absolute-from-gregorian anniv-date)
                  (calendar-absolute-from-gregorian agenda-date))))
    (cond
     ((= delta 0) " -- today\\&")
     ((= delta 1) " -- tomorrow\\&")
     ((< delta org-bbdb-general-anniversary-description-after)
      (format " -- in %d days\\&" delta))
     ((pcase-let ((`(,month ,day ,year) anniv-date))
	(format " -- %d-%02d-%02d\\&" year month day))))))