diff options
author | Glenn Morris <rgm@gnu.org> | 2008-03-31 07:51:16 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-03-31 07:51:16 +0000 |
commit | fb9e0d34948fd981f16072c28026618859f5d79a (patch) | |
tree | 73bca4ffe00a2e8c4b2e7999cc3f4fe710106a56 /lisp/calendar/cal-bahai.el | |
parent | c8b69b0ac8b504a5ff5893df1c34434ce5d0c103 (diff) | |
download | emacs-fb9e0d34948fd981f16072c28026618859f5d79a.tar.gz |
(calendar-bahai-date-string): Make previous change more explicit.
Diffstat (limited to 'lisp/calendar/cal-bahai.el')
-rw-r--r-- | lisp/calendar/cal-bahai.el | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el index 0bf97dd8a93..f7e552b6b6c 100644 --- a/lisp/calendar/cal-bahai.el +++ b/lisp/calendar/cal-bahai.el @@ -123,25 +123,24 @@ Defaults to today's date if DATE is not given." (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)) - (d (extract-calendar-day bahai-date)) - (monthname (if (or (< m 1) ; pre-Bahai, avoid aref error - (and (= m 19) - (<= d 0))) - "Ayyám-i-Há" - (aref calendar-bahai-month-name-array (1- m)))) - (day (int-to-string - (if (<= d 0) - (+ d (if (calendar-bahai-leap-year-p y) 5 4)) - d))) - (year (int-to-string y)) - (month (int-to-string m)) - dayname) + (y (extract-calendar-year bahai-date))) (if (< y 1) - "" - ;; Can't call calendar-date-string because of monthname oddity. - (mapconcat 'eval calendar-date-display-form "")))) + "" ; pre-Bahai + (let* ((m (extract-calendar-month bahai-date)) + (d (extract-calendar-day bahai-date)) + (monthname (if (and (= m 19) + (<= d 0)) + "Ayyám-i-Há" + (aref calendar-bahai-month-name-array (1- m)))) + (day (int-to-string + (if (<= d 0) + (+ d (if (calendar-bahai-leap-year-p y) 5 4)) + d))) + (year (int-to-string y)) + (month (int-to-string m)) + dayname) + ;; Can't call calendar-date-string because of monthname oddity. + (mapconcat 'eval calendar-date-display-form ""))))) ;;;###cal-autoload (defun calendar-bahai-print-date () |