]> git.eshelyaron.com Git - emacs.git/commitdiff
(holiday-islamic-new-year): New function.
authorGlenn Morris <rgm@gnu.org>
Thu, 3 Apr 2008 04:07:01 +0000 (04:07 +0000)
committerGlenn Morris <rgm@gnu.org>
Thu, 3 Apr 2008 04:07:01 +0000 (04:07 +0000)
lisp/calendar/cal-islam.el

index 932f2327a7cd9584ce6d7cecf113090651e3d261..5579a0b28e7b9a97613a293b2c7a18fa9efc8083 100644 (file)
@@ -218,6 +218,23 @@ nil if it is not visible in the current calendar window."
                         (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