Function: calendar-french-goto-date

calendar-french-goto-date is an autoloaded, interactive and byte-compiled function defined in cal-french.el.gz.

Signature

(calendar-french-goto-date DATE &optional NOECHO)

Documentation

Move cursor to French Revolutionary date DATE.

Echo French Revolutionary date unless NOECHO is non-nil.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/cal-french.el.gz
;;;###cal-autoload
(defun calendar-french-goto-date (date &optional noecho)
  "Move cursor to French Revolutionary date DATE.
Echo French Revolutionary date unless NOECHO is non-nil."
  (interactive
   (let* ((months calendar-french-month-name-array)
          (feasts calendar-french-feasts-array)
          (year (progn
                  (calendar-read-sexp
                   "Année de la Révolution (>0)"
                   (lambda (x) (> x 0))
                   (calendar-extract-year
                    (calendar-french-from-absolute
                     (calendar-absolute-from-gregorian
                      (calendar-current-date)))))))
          (month-list
           (mapcar 'list
                   (append months
                           (if (calendar-french-leap-year-p year)
                               (mapcar #'calendar-french-trim-feast feasts)
                             (reverse
                              (cdr ; we don't want rev. day in a non-leap yr
                               (reverse
                                (mapcar #'calendar-french-trim-feast
                                        feasts))))))))
          (completion-ignore-case t)
          (month (cdr (assoc-string
                       (completing-read
                        "Mois ou \"jour complémentaire\" ou fête: "
                        month-list
                        nil t)
                       (calendar-make-alist month-list 1 'car) t)))
          (last-day (calendar-french-last-day-of-month (min month 13) year))
          (day (if (> month 13)
                   (- month 13)
                 (calendar-read-sexp
                  (format "Jour (1-%d): " last-day)
                  (lambda (x) (<= 1 x last-day)))))
          ;; All days in Vendémiaire and numbered 1 to 365 e.g., "Pomme"
          ;; gives 31 Vendémiaire automatically normalized to 1 Brumaire
          ;; "Céleri" gives 32 Vnd normalized to 2 Bru, "Raiponce" gives
          ;; 61 Vnd normalized to 1 Frimaire, etc until "Récompences" which
          ;; gives 365 Vnd normalized to 5 jour complémentaire.
          (month (if (> month 13) 1 month)))
     (list (list month day year))))
  (calendar-goto-date (calendar-gregorian-from-absolute
                       (calendar-french-to-absolute date)))
  (or noecho (calendar-french-print-date)))