emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/cal-bahai.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/cal-bahai.el,v
Date: Mon, 31 Mar 2008 07:51:16 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/03/31 07:51:16

Index: cal-bahai.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-bahai.el,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- cal-bahai.el        31 Mar 2008 01:47:11 -0000      1.40
+++ cal-bahai.el        31 Mar 2008 07:51:16 -0000      1.41
@@ -123,12 +123,13 @@
   (let* ((bahai-date (calendar-bahai-from-absolute
                       (calendar-absolute-from-gregorian
                        (or date (calendar-current-date)))))
-         (y (extract-calendar-year bahai-date))
-         (m (extract-calendar-month bahai-date))
+         (y (extract-calendar-year bahai-date)))
+    (if (< y 1)
+        ""                              ; pre-Bahai
+      (let* ((m (extract-calendar-month bahai-date))
          (d (extract-calendar-day bahai-date))
-         (monthname (if (or (< m 1)     ; pre-Bahai, avoid aref error
-                            (and (= m 19)
-                                 (<= d 0)))
+             (monthname (if (and (= m 19)
+                                 (<= d 0))
                         "Ayyám-i-Há"
                       (aref calendar-bahai-month-name-array (1- m))))
          (day (int-to-string
@@ -138,10 +139,8 @@
          (year (int-to-string y))
          (month (int-to-string m))
          dayname)
-    (if (< y 1)
-        ""
       ;; Can't call calendar-date-string because of monthname oddity.
-      (mapconcat 'eval calendar-date-display-form ""))))
+        (mapconcat 'eval calendar-date-display-form "")))))
 
 ;;;###cal-autoload
 (defun calendar-bahai-print-date ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]