diff options
| -rw-r--r-- | lisp/calendar/cal-bahai.el | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 4674ad97a20..ad72c852579 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el | |||
| @@ -226,6 +226,33 @@ nil if it is not visible in the current calendar window." | |||
| 226 | (calendar-absolute-from-bahai (list month day y))))) | 226 | (calendar-absolute-from-bahai (list month day y))))) |
| 227 | (list (list date string)))))) | 227 | (list (list date string)))))) |
| 228 | 228 | ||
| 229 | (autoload 'holiday-fixed "holidays") | ||
| 230 | |||
| 231 | ;;;###holiday-autoload | ||
| 232 | (defun holiday-bahai-new-year () | ||
| 233 | "Holiday entry for the Bahá'í New Year, if visible in the calendar window." | ||
| 234 | (holiday-fixed 3 21 | ||
| 235 | (format "Bahá'í New Year (Naw-Ruz) %d" | ||
| 236 | (- displayed-year (1- 1844))))) | ||
| 237 | |||
| 238 | ;;;###holiday-autoload | ||
| 239 | (defun holiday-bahai-ridvan (&optional all) | ||
| 240 | "Holidays related to Ridvan, as visible in the calendar window. | ||
| 241 | Only considers the first, ninth, and twelfth days, unless ALL or | ||
| 242 | `all-bahai-calendar-holidays' is non-nil." | ||
| 243 | (let ((ord ["First" "Second" "Third" "Fourth" "Fifth" "Sixth" | ||
| 244 | "Seventh" "Eighth" "Ninth" "Tenth" "Eleventh" "Twelfth"]) | ||
| 245 | (show '(0 8 11)) | ||
| 246 | rid h) | ||
| 247 | (if (or all all-bahai-calendar-holidays) | ||
| 248 | (setq show (number-sequence 0 11))) | ||
| 249 | ;; More trouble than it was worth...? | ||
| 250 | (dolist (i show (nreverse rid)) | ||
| 251 | (if (setq h (holiday-fixed (if (< i 10) 4 5) | ||
| 252 | (+ i (if (< i 10) 21 -9)) | ||
| 253 | (format "%s Day of Ridvan" (aref ord i)))) | ||
| 254 | (push (car h) rid))))) | ||
| 255 | |||
| 229 | (autoload 'diary-list-entries-1 "diary-lib") | 256 | (autoload 'diary-list-entries-1 "diary-lib") |
| 230 | 257 | ||
| 231 | ;;;###diary-autoload | 258 | ;;;###diary-autoload |