Function: calendar-persian-read-date
calendar-persian-read-date is a byte-compiled function defined in
cal-persia.el.gz.
Signature
(calendar-persian-read-date)
Documentation
Interactively read the arguments for a Persian date command.
Reads a year, month, and day.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-persia.el.gz
(defun calendar-persian-read-date ()
"Interactively read the arguments for a Persian date command.
Reads a year, month, and day."
(let* ((year (calendar-read-sexp
"Persian calendar year (not 0)"
(lambda (x) (not (zerop x)))
(calendar-extract-year
(calendar-persian-from-absolute
(calendar-absolute-from-gregorian
(calendar-current-date))))))
(completion-ignore-case t)
(month (cdr (assoc
(completing-read
"Persian calendar month name: "
(mapcar 'list
(append calendar-persian-month-name-array nil))
nil t)
(calendar-make-alist calendar-persian-month-name-array
1))))
(last (calendar-persian-last-day-of-month month year))
(day (calendar-read-sexp
"Persian calendar day (1-%d)"
(lambda (x) (and (< 0 x) (<= x last)))
nil
last)))
(list (list month day year))))