;ELC   
;;; Compiled by kwzh@mescaline.gnu.org on Sat Jun 20 19:52:56 1998
;;; from file /gnu/gd/gd/1/gnu/emacs/lisp/calendar/cal-french.el
;;; in Emacs version 20.2.96.1
;;; with bytecomp version 2.46
;;; with all optimizations.

;;; This file contains multibyte non-ASCII characters
;;; and therefore cannot be loaded into Emacs 19.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "20")))
    (error "`cal-french.el' was compiled for Emacs 20 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'calendar)
#@42 True if diacritical marks are available.
(defalias 'french-calendar-accents #[nil "\204	 \303 \205 	\206 \304\n!\205 \n\305H\306\232\207" [window-system enable-multibyte-characters standard-display-table terminal-coding-system char-table-p 161 [161]] 2 (#$ . 645)])
#@79 Absolute date of start of French Revolutionary calendar = September 22, 1792.
(defconst french-calendar-epoch (byte-code "\306\306\211AA@)S\211\211@)\211A@)\211AA@)\nS\307_\\\n\310V\203X \n\311_\312\\\313\245Z\f\211\311\246\314U\205Q \f\315\246\314U?\206Q \f\316\246\314U)\203X T-	\317_\\	\311\245\\	\315\245[\\	\316\245\\*\207" [date prior-years month day year day-of-year (9 22 1792) 31 2 4 23 10 0 100 400 365] 5) (#$ . 921))
(byte-code "\306\300	B\307\302	B\310\303	B\311\304	B\312\305	B\300\207" [french-calendar-month-name-array current-load-list french-calendar-multibyte-month-name-array french-calendar-day-name-array french-calendar-multibyte-special-days-array french-calendar-special-days-array ["Vende'miaire" "Brumaire" "Frimaire" "Nivo^se" "Pluvio^se" "Vento^se" "Germinal" "Flore'al" "Prairial" "Messidor" "Thermidor" "Fructidor"] ["Vend�émiaire" "Brumaire" "Frimaire" "Niv�ôse" "Pluvi�ôse" "Vent�ôse" "Germinal" "Flor�éal" "Prairial" "Messidor" "Thermidor" "Fructidor"] ["Primidi" "Duodi" "Tridi" "Quartidi" "Quintidi" "Sextidi" "Septidi" "Octidi" "Nonidi" "Decadi"] ["de la Vertu" "du G�énie" "du Labour" "de la Raison" "de la R�écompense" "de la R�évolution"] ["de la Vertu" "du Ge'nie" "du Labour" "de la Raison" "de la Re'compense" "de la Re'volution"]] 2)
(defalias 'french-calendar-month-name-array #[nil "\302 \203 \207	\207" [french-calendar-multibyte-month-name-array french-calendar-month-name-array french-calendar-accents] 1])
(defalias 'french-calendar-day-name-array #[nil "\207" [french-calendar-day-name-array] 1])
(defalias 'french-calendar-special-days-array #[nil "\302 \203 \207	\207" [french-calendar-multibyte-special-days-array french-calendar-special-days-array french-calendar-accents] 1])
#@455 True if YEAR is a leap year on the French Revolutionary calendar.
For Gregorian years 1793 to 1805, the years of actual operation of the
calendar, follows historical practice based on equinoxes (years 3, 7,
and 11 were leap years; 15 and 20 would have been leap years).  For later
years uses the proposed rule of Romme (never adopted)--leap years fall every
four years except century years not divisible 400 and century years that are
multiples of 4000.
(defalias 'french-calendar-leap-year-p #[(year) "\301>\206) \302>\206) \303V\205) \304\246\305U\205) \306\246\307>?\205) \310\246\305U?\207" [year (3 7 11) (15 20) 20 4 0 400 (100 200 300) 4000] 2 (#$ . 2696)])
#@191 Return last day of MONTH, YEAR on the French Revolutionary calendar.
The 13th month is not really a month, but the 5 (6 in leap years) day period of
`sansculottides' at the end of the year.
(defalias 'french-calendar-last-day-of-month #[(month year) "\302W\203 \303\207\304	!\203 \305\207\306\207" [month year 13 30 french-calendar-leap-year-p 6 5] 2 (#$ . 3374)])
#@172 Compute absolute date from French Revolutionary date DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-absolute-from-french #[(date) "\211@)\211A@)\211AA@)	S\305_	\306W\203% 	\307\245\202: 	S\307\245	S\310\245[\\	S\311\245\\	S\312\245[\\\\S\313_\\\n\\\fS\\+\207" [date year day month french-calendar-epoch 365 20 4 100 400 4000 30] 5 (#$ . 3749)])
#@232 Compute the French Revolutionary equivalent for absolute date DATE.
The result is a list of the form (MONTH DAY YEAR).
The absolute date is the number of days elapsed since the
(imaginary) Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-french-from-absolute #[(date) "	W\203 \306\211\211E\207	Z\307\245\211\211\306\310\311\211\fTE!Y\203+ T\fT\202 *\\\311\306\310\312\"E!V\203O TT\2024 *T\f\310\f\311E!SZ\fE,\207" [date french-calendar-epoch approx sum y year 0 366 calendar-absolute-from-french 1 french-calendar-last-day-of-month m month day] 7 (#$ . 4202)])
#@165 String of French Revolutionary date of Gregorian DATE.
Returns the empty string if DATE is pre-French Revolutionary.
Defaults to today's date if DATE is not given.
(defalias 'calendar-french-date-string #[(&optional date) "\306\206 \307 \211\211AA@)S\211\211@)\211A@)\211AA@)\nS\310_\\\n\311V\203^ \n\312_\313\\\314\245Z\f\211\312\246\315U\205W \f\316\246\315U?\206W \f\317\246\315U)\203^ T-	\320_\\	\312\245\\	\316\245[\\	\317\245\\*!\211\211AA@) \211@)!\211A@)\" \321W\203\232 \322\202\335 !\323U\203\270 \324\325 \203\253 \326\202\254 \327\330 \"SH #\202\335 \324\325 \203\302 \331\202\303 \332\333\"S\314\245T\334\"\335 \"S\314\246H\336 !SH %,\207" [date prior-years month day year day-of-year calendar-french-from-absolute calendar-current-date 31 2 4 23 10 0 100 400 365 1 "" 13 format french-calendar-accents "Jour %s de l'Ann�ée %d de la R�évolution" "Jour %s de l'Anne'e %d de la Re'volution" french-calendar-special-days-array "D�écade %s, %s de %s de l'Ann�ée %d de la R�évolution" "De'cade %s, %s de %s de l'Anne'e %d de la Re'volution" make-string 73 french-calendar-day-name-array french-calendar-month-name-array french-date y m d] 7 (#$ . 4823)])
#@73 Show the French Revolutionary calendar equivalent of the selected date.
(defalias 'calendar-print-french-date #[nil "\301\302\303!!\211\304\230\203 \305\306!\202 \305\307\")\207" [f calendar-french-date-string calendar-cursor-to-date t "" message "Date is pre-French Revolution" "French Revolutionary date: %s"] 4 (#$ . 6035) nil])
#@99 Move cursor to French Revolutionary date DATE.
Echo French Revolutionary date unless NOECHO is t.
(defalias 'calendar-goto-french-date #[(date &optional noecho) "\302\303\304!!!\210	\206 \305 \207" [date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-french calendar-print-french-date] 4 (#$ . 6377) (let ((accents (french-calendar-accents)) (months (french-calendar-month-name-array)) (special-days (french-calendar-special-days-array))) (let* ((year (progn (calendar-read (if accents "Ann�ée de la R�évolution (>0): " "Anne'e de la Re'volution (>0): ") '(lambda (x) (> x 0)) (int-to-string (extract-calendar-year (calendar-french-from-absolute (calendar-absolute-from-gregorian (calendar-current-date)))))))) (month-list (mapcar 'list (append months (if (french-calendar-leap-year-p year) (mapcar '(lambda (x) (concat "Jour " x)) french-calendar-special-days-array) (reverse (cdr (reverse (mapcar '(lambda (x) (concat "Jour " x)) special-days)))))))) (completion-ignore-case t) (month (cdr (assoc (capitalize (completing-read "Mois ou Sansculottide: " month-list nil t)) (calendar-make-alist month-list 1 '(lambda (x) (capitalize (car x))))))) (decade (if (> month 12) 1 (calendar-read (if accents "D�écade (1-3): " "De'cade (1-3): ") '(lambda (x) (memq x '(1 2 3)))))) (day (if (> month 12) (- month 12) (calendar-read "Jour (1-10): " '(lambda (x) (and (<= 1 x) (<= x 10)))))) (month (if (> month 12) 13 month)) (day (+ day (* 10 (1- decade))))) (list (list month day year))))])
#@49 French calendar equivalent of date diary entry.
(defalias 'diary-french-date #[nil "\302!\211\303\230\203 \304\202 \305\306	\")\207" [date f calendar-french-date-string "" "Date is pre-French Revolution" format "French Revolutionary date: %s"] 4 (#$ . 7902)])
(provide 'cal-french)
