;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:36:58 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/calendar/cal-french.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; 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 (#$ . 651)])
#@79 Absolute date of start of French Revolutionary calendar = September 22, 1792.
(defconst french-calendar-epoch (byte-code "\302\303!S\304!\305	_\\	\306\245\\	\307\245[\\	\310\245\\*\207" [date prior-years (9 22 1792) extract-calendar-year calendar-day-number 365 4 100 400] 3) (#$ . 927))
(byte-code "\301B\306\302B\307\303B\310\304B\311\305B\312\301\207" [current-load-list french-calendar-month-name-array 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 Travail" "de la Raison" "des Récompenses" "de la Révolution"] ["de la Vertu" "du Ge'nie" "du Travail" "de la Raison" "des Re'compenses" "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\305\246!\205) \306\246\307>?\205) \304\310\246!?\207" [year (3 7 11) (15 20) 20 zerop 4 400 (100 200 300) 4000] 3 (#$ . 2544)])
#@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 (#$ . 3226)])
#@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 (#$ . 3601)])
#@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 (#$ . 4054)])
#@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 \310!S\311!\312	_\\	\313\245\\	\314\245[\\	\315\245\\*!\211\211AA@)\n\211@)\n\211A@)\316W\203C \317\202q \f\320U\203^ \321\322 \203S \323\202T \324\325 SH#\202q \321\322 \203h \326\202i \327\330 \fSH$,\207" [date prior-years french-date y m d calendar-french-from-absolute calendar-current-date extract-calendar-year calendar-day-number 365 4 100 400 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 %s an %d de la Révolution" "%d %s an %d de la Re'volution" french-calendar-month-name-array] 6 (#$ . 4675)])
#@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 (#$ . 5561) 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 (#$ . 5903) (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-ignore-case (completing-read "Mois ou Sansculottide: " month-list nil t) (calendar-make-alist month-list 1 'car)))) (day (if (> month 12) (- month 12) (calendar-read "Jour (1-30): " '(lambda (x) (and (<= 1 x) (<= x 30)))))) (month (if (> month 12) 13 month))) (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 (#$ . 7238)])
(provide 'cal-french)
