changeset 93577:bac2b63b476f

(holiday-islamic-new-year): New function.
author Glenn Morris <rgm@gnu.org>
date Thu, 03 Apr 2008 04:07:01 +0000
parents ed9ff03f156c
children 14c23c86b7aa
files lisp/calendar/cal-islam.el
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-islam.el	Thu Apr 03 04:06:55 2008 +0000
+++ b/lisp/calendar/cal-islam.el	Thu Apr 03 04:07:01 2008 +0000
@@ -218,6 +218,23 @@
                         (calendar-absolute-from-islamic (list month day y)))))
            (list (list date string))))))
 
+;;;###holiday-autoload
+(defun holiday-islamic-new-year ()
+  "Holiday entry for the Islamic New Year, if visible in the calendar window."
+  (let ((date (caar (holiday-islamic 1 1 "")))
+        (m displayed-month)
+        (y displayed-year))
+    (and date
+         (list (list date
+                     (format "Islamic New Year %d"
+                             (progn
+                               (increment-calendar-month m y 1)
+                               (extract-calendar-year
+                                (calendar-islamic-from-absolute
+                                 (calendar-absolute-from-gregorian
+                                  (list m (calendar-last-day-of-month m y) y)
+                                  ))))))))))
+
 (autoload 'diary-list-entries-1 "diary-lib")
 
 ;;;###diary-autoload