Function: holiday-advent
holiday-advent is a byte-compiled function defined in holidays.el.gz.
Signature
(holiday-advent &optional N STRING)
Documentation
Date of Nth day after advent (named STRING), if visible in calendar window.
Negative values of N are interpreted as days before advent. STRING is used purely for display purposes. The return value has the form ((MONTH DAY YEAR) STRING), where the date is that of the Nth day before or after advent.
For backwards compatibility, if this function is called with no arguments, then it returns the value appropriate for advent itself.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/holidays.el.gz
(defun holiday-advent (&optional n string)
"Date of Nth day after advent (named STRING), if visible in calendar window.
Negative values of N are interpreted as days before advent.
STRING is used purely for display purposes. The return value has
the form ((MONTH DAY YEAR) STRING), where the date is that of the
Nth day before or after advent.
For backwards compatibility, if this function is called with no
arguments, then it returns the value appropriate for advent itself."
;; Backwards compatibility layer.
(if (not n)
(holiday-advent 0 "Advent")
(let* ((year displayed-year)
(month displayed-month)
(advent (progn
(calendar-increment-month month year -1)
(calendar-gregorian-from-absolute
(+ n
(calendar-dayname-on-or-before
0
(calendar-absolute-from-gregorian
(list 12 3 year))))))))
(if (calendar-date-is-visible-p advent)
(list (list advent string))))))