Function: calendar-coptic-read-date

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

Signature

(calendar-coptic-read-date)

Documentation

Interactively read the arguments for a Coptic date command.

Reads a year, month, and day.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-coptic.el.gz
(defun calendar-coptic-read-date ()
  "Interactively read the arguments for a Coptic date command.
Reads a year, month, and day."
  (let* ((today (calendar-current-date))
         (year (calendar-read-sexp
                "%s calendar year (>0)"
                (lambda (x) (> x 0))
                (calendar-extract-year
                 (calendar-coptic-from-absolute
                  (calendar-absolute-from-gregorian today)))
                calendar-coptic-name))
         (completion-ignore-case t)
         (month (cdr (assoc-string
                      (completing-read
                       (format "%s calendar month name: " calendar-coptic-name)
                       (mapcar 'list
                               (append calendar-coptic-month-name-array nil))
                       nil t)
                      (calendar-make-alist calendar-coptic-month-name-array
                                           1)
                      t)))
         (last (calendar-coptic-last-day-of-month month year))
         (day (calendar-read-sexp
               "%s calendar day (1-%d)"
               (lambda (x) (and (< 0 x) (<= x last)))
               1
               calendar-coptic-name last)))
    (list (list month day year))))