Function: calendar-chinese-goto-date
calendar-chinese-goto-date is an autoloaded, interactive and
byte-compiled function defined in cal-china.el.gz.
Signature
(calendar-chinese-goto-date DATE &optional NOECHO)
Documentation
Move cursor to Chinese date DATE.
Echo Chinese date unless NOECHO is non-nil.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/cal-china.el.gz
;;;###cal-autoload
(defun calendar-chinese-goto-date (date &optional noecho)
"Move cursor to Chinese date DATE.
Echo Chinese date unless NOECHO is non-nil."
(interactive
(let* ((c (calendar-chinese-from-absolute
(calendar-absolute-from-gregorian (calendar-current-date))))
(cycle (calendar-read-sexp
"Chinese calendar cycle number (>44)"
(lambda (x) (> x 44))
(car c)))
(year (calendar-read-sexp
"Year in Chinese cycle (1..60)"
(lambda (x) (and (<= 1 x) (<= x 60)))
(cadr c)))
(month-list (calendar-chinese-months-to-alist
(calendar-chinese-months cycle year)))
(month (cdr (assoc
(completing-read "Chinese calendar month: "
month-list nil t)
month-list)))
(last (if (= month
(nth 2
(calendar-chinese-from-absolute
(+ 29
(calendar-chinese-to-absolute
(list cycle year month 1))))))
30
29))
(day (calendar-read-sexp
"Chinese calendar day (1-%d)"
(lambda (x) (and (<= 1 x) (<= x last)))
nil
last)))
(list (list cycle year month day))))
(calendar-goto-date (calendar-gregorian-from-absolute
(calendar-chinese-to-absolute date)))
(or noecho (calendar-chinese-print-date)))