comparison lisp/calendar/cal-bahai.el @ 93574:72ed60a2d901

(holiday-fixed): Autoload it. (holiday-bahai-new-year, holiday-bahai-ridvan): New functions.
author Glenn Morris <rgm@gnu.org>
date Thu, 03 Apr 2008 04:05:56 +0000
parents 2b5b4299a020
children 0dcb238ad128
comparison
equal deleted inserted replaced
93573:553dfbccecfa 93574:72ed60a2d901
224 (calendar-date-is-visible-p 224 (calendar-date-is-visible-p
225 (setq date (calendar-gregorian-from-absolute 225 (setq date (calendar-gregorian-from-absolute
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
232 (defun diary-bahai-list-entries () 259 (defun diary-bahai-list-entries ()
233 "Add any Bahá'í date entries from the diary file to `diary-entries-list'. 260 "Add any Bahá'í date entries from the diary file to `diary-entries-list'.