aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob S. Gordon2026-01-08 16:20:00 -0500
committerEli Zaretskii2026-01-10 15:37:55 +0200
commit57df5d5cbaf88b21ad53152b145b5b0c8303951d (patch)
treef7108112636ad709ce05738ecb0e42c33b8bda59
parente13642593276b25c5032ec9254aeb23feb2d313c (diff)
downloademacs-57df5d5cbaf88b21ad53152b145b5b0c8303951d.tar.gz
emacs-57df5d5cbaf88b21ad53152b145b5b0c8303951d.zip
; 'holiday-float': Improve documentation of edge case
When MONTH DAY falls on DAYNAME the holiday may be closer to MONTH DAY than expected. Describe this situation in the function's doc string. (Bug#00000) * lisp/calendar/holidays.el (holiday-float): Improve documentation.
-rw-r--r--lisp/calendar/holidays.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 3acaf9b91e2..696a5b50aa1 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -654,10 +654,17 @@ STRING)). Returns nil if it is not visible in the current calendar window."
654 654
655(defun holiday-float (month dayname n string &optional day) 655(defun holiday-float (month dayname n string &optional day)
656 "Holiday called STRING on the Nth DAYNAME after/before MONTH DAY. 656 "Holiday called STRING on the Nth DAYNAME after/before MONTH DAY.
657DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on. 657DAYNAME = 0 means Sunday, DAYNAME = 1 means Monday, and so on. DAY
658If N>0, use the Nth DAYNAME after MONTH DAY. 658defaults to 1 if N > 0, and MONTH's last day otherwise.
659If N<0, use the Nth DAYNAME before MONTH DAY. 659
660DAY defaults to 1 if N>0, and MONTH's last day otherwise. 660If N > 0, use the Nth DAYNAME after MONTH DAY.
661If N < 0, use the Nth DAYNAME before MONTH DAY.
662
663When MONTH DAY falls on DAYNAME, the holiday will be |N|-1 weeks before
664or after MONTH DAY. For example, with N = +1 (-1) the holiday falls on
665MONTH DAY, and with N = +2 (-2) the holiday falls 1 week after (before)
666MONTH DAY.
667
661If the holiday is visible in the calendar window, returns a 668If the holiday is visible in the calendar window, returns a
662list (((month day year) STRING)). Otherwise returns nil." 669list (((month day year) STRING)). Otherwise returns nil."
663 ;; This is messy because the holiday may be visible, while the date 670 ;; This is messy because the holiday may be visible, while the date