Function: calendar-bahai-read-date

calendar-bahai-read-date is a byte-compiled function defined in cal-bahai.el.gz.

Signature

(calendar-bahai-read-date)

Documentation

Interactively read the arguments for a Bahá’í date command.

Reads a year, month and day.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-bahai.el.gz
(defun calendar-bahai-read-date ()
 "Interactively read the arguments for a Bahá’í date command.
Reads a year, month and day."
  (let* ((today (calendar-current-date))
         (year (calendar-read-sexp
                "Bahá’í calendar year (not 0)"
                (lambda (x) (not (zerop x)))
                (calendar-extract-year
                 (calendar-bahai-from-absolute
                  (calendar-absolute-from-gregorian today)))))
         (completion-ignore-case t)
         (month (cdr (assoc
                      (completing-read
                       "Bahá’í calendar month name: "
                       (mapcar 'list
                               (append calendar-bahai-month-name-array nil))
                       nil t)
                      (calendar-make-alist calendar-bahai-month-name-array
                                           1))))
         (day (calendar-read-sexp "Bahá’í calendar day (1-19)"
                                  (lambda (x) (and (< 0 x) (<= x 19))))))
    (list (list month day year))))