Function: holiday-easter-etc
holiday-easter-etc is a byte-compiled function defined in
holidays.el.gz.
Signature
(holiday-easter-etc &optional N STRING)
Documentation
Date of Nth day after Easter (named STRING), if visible in calendar window.
Negative values of N are interpreted as days before Easter. 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 Easter.
For backwards compatibility, if this function is called with no
arguments, then it returns a list of "standard" Easter-related
holidays (with more entries if calendar-christian-all-holidays-flag
is non-nil).
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/holidays.el.gz
(defun holiday-easter-etc (&optional n string)
"Date of Nth day after Easter (named STRING), if visible in calendar window.
Negative values of N are interpreted as days before Easter.
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 Easter.
For backwards compatibility, if this function is called with no
arguments, then it returns a list of \"standard\" Easter-related
holidays (with more entries if `calendar-christian-all-holidays-flag'
is non-nil)."
;; Backwards compatibility layer.
(if (not n)
(apply 'append
(mapcar (lambda (e)
(apply 'holiday-easter-etc e))
;; The combined list is not in order.
(append
(if calendar-christian-all-holidays-flag
'((-63 "Septuagesima Sunday")
(-56 "Sexagesima Sunday")
(-49 "Shrove Sunday")
(-48 "Shrove Monday")
(-47 "Shrove Tuesday")
(-14 "Passion Sunday")
(-7 "Palm Sunday")
(-3 "Maundy Thursday")
(35 "Rogation Sunday")
(39 "Ascension Day")
(49 "Pentecost (Whitsunday)")
(50 "Whitmonday")
(56 "Trinity Sunday")
(60 "Corpus Christi")))
'((-46 "Ash Wednesday")
(-2 "Good Friday")
(0 "Easter Sunday")))))
(let* ((century (1+ (/ displayed-year 100)))
(shifted-epact ; age of moon for April 5...
(% (+ 14 (* 11 (% displayed-year 19)) ; ...by Nicaean rule
(- ; ...corrected for the Gregorian century rule
(/ (* 3 century) 4))
(/ ; ...corrected for Metonic cycle inaccuracy
(+ 5 (* 8 century)) 25)
(* 30 century)) ; keeps value positive
30))
(adjusted-epact ; adjust for 29.5 day month
(if (or (zerop shifted-epact)
(and (= shifted-epact 1) (< 10 (% displayed-year 19))))
(1+ shifted-epact)
shifted-epact))
(paschal-moon ; day after the full moon on or after March 21
(- (calendar-absolute-from-gregorian (list 4 19 displayed-year))
adjusted-epact))
(abs-easter (calendar-dayname-on-or-before 0 (+ paschal-moon 7)))
(greg (calendar-gregorian-from-absolute (+ abs-easter n))))
(if (calendar-date-is-visible-p greg)
(list (list greg string))))))