400 |
(string (if date (eval string)))) |
(string (if date (eval string)))) |
401 |
(list (list date string))))))) |
(list (list date string))))))) |
402 |
|
|
403 |
(defun holiday-advent (n string) |
(defun holiday-advent (&optional n string) |
404 |
"Date of Nth day after advent (named STRING), if visible in calendar window." |
"Date of Nth day after advent (named STRING), if visible in calendar window. |
405 |
(let ((year displayed-year) |
Negative values of N are interpreted as days before advent. |
406 |
(month displayed-month)) |
STRING is used purely for display purposes. The return value has |
407 |
(increment-calendar-month month year -1) |
the form ((MONTH DAY YEAR) STRING), where the date is that of the |
408 |
(let ((advent (calendar-gregorian-from-absolute |
Nth day before or after advent. |
409 |
(+ n |
|
410 |
(calendar-dayname-on-or-before |
For backwards compatability, if this function is called with no |
411 |
0 |
arguments, then it returns the value appropriate for advent itself." |
412 |
(calendar-absolute-from-gregorian |
;; Backwards compatability layer. |
413 |
(list 12 3 year))))))) |
(if (not n) |
414 |
(if (calendar-date-is-visible-p advent) |
(holiday-advent 0 "Advent") |
415 |
(list (list advent string)))))) |
(let ((year displayed-year) |
416 |
|
(month displayed-month)) |
417 |
|
(increment-calendar-month month year -1) |
418 |
|
(let ((advent (calendar-gregorian-from-absolute |
419 |
|
(+ n |
420 |
|
(calendar-dayname-on-or-before |
421 |
|
0 |
422 |
|
(calendar-absolute-from-gregorian |
423 |
|
(list 12 3 year))))))) |
424 |
|
(if (calendar-date-is-visible-p advent) |
425 |
|
(list (list advent string))))))) |
426 |
|
|
427 |
(defun holiday-easter-etc (&optional n string) |
(defun holiday-easter-etc (&optional n string) |
428 |
"Date of Nth day after Easter (named STRING), if visible in calendar window. |
"Date of Nth day after Easter (named STRING), if visible in calendar window. |