;ELC
;;; Compiled by LTX@Xue-LingTaos-MacBook-Pro.local on Wed Mar 16 23:10:13 2011
;;; from file /Users/LTX/Projects/Emacs/emacs/lisp/calendar/cal-french.el
;;; in Emacs version 24.0.50.1
;;; with all optimizations.

;;; This file contains utf-8 non-ASCII characters,
;;; and so cannot be loaded into Emacs 22 or earlier.
(and (boundp 'emacs-version)
     (< (aref emacs-version (1- (length emacs-version))) ?A)
     (string-lessp emacs-version "23")
     (error "`cal-french.el' was compiled for Emacs 23 or later"))

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


(require 'calendar)
#@74 Absolute date of start of French Revolutionary calendar = Sept 22, 1792.
(defconst calendar-french-epoch (byte-code "\306\211\3078)\310\311\n!\203\312\313!\202j\n\314V\203\223\nS\315\211\211@)\211\211A@*\3078)
S\316_\\\307V\203\317\320_\\\321\245Z\n\211\314W\203`\322\n!S\311\n\320\246!\205v\311\n\323\246!?\206v\311\n\324\246!)\203T-	\325_	\320\245	\323\245[	\324\245%\202j\322\nT!\326\211\211@)\211\211A@*\3078)
S\316_\\\307V\203\367\317\320_\\\321\245Z\n\211\314W\203\330\322\n!S\311\n\320\246!\205\356\311\n\323\246!?\206\356\311\n\324\246!)\203\367T-	\325_	\320\245	\323\245[	\324\245\327\211\327@)\211\211A@*\3078)
S\316_\\\307V\203e\317\320_\\\321\245Z\n\211\314W\203F\322\n!S\311\n\320\246!\205\\\311\n\323\246!?\206\\\311\n\324\246!)\203eT-&+\207" [date offset-years year month x day (9 22 1792) 2 nil zerop error "There was no year zero" 0 + 31 23 4 10 abs 100 400 365 - (12 31 -1) day-of-year] 11) (#$ . 573))
#@46 Array of month names in the French calendar.
(defconst calendar-french-month-name-array ["Vende'miaire" "Brumaire" "Frimaire" "Nivo^se" "Pluvio^se" "Vento^se" "Germinal" "Flore'al" "Prairial" "Messidor" "Thermidor" "Fructidor"] (#$ . 1616))
#@56 Array of multibyte month names in the French calendar.
(defconst calendar-french-multibyte-month-name-array ["VendÃ©miaire" "Brumaire" "Frimaire" "NivÃ´se" "PluviÃ´se" "VentÃ´se" "Germinal" "FlorÃ©al" "Prairial" "Messidor" "Thermidor" "Fructidor"] (#$ . 1863))
#@44 Array of day names in the French calendar.
(defconst calendar-french-day-name-array ["Primidi" "Duodi" "Tridi" "Quartidi" "Quintidi" "Sextidi" "Septidi" "Octidi" "Nonidi" "Decadi"] (#$ . 2130))
#@52 Array of special day names in the French calendar.
(defconst calendar-french-special-days-array ["de la Vertu" "du Ge'nie" "du Travail" "de la Raison" "des Re'compenses" "de la Re'volution"] (#$ . 2330))
#@62 Array of multibyte special day names in the French calendar.
(defconst calendar-french-multibyte-special-days-array ["de la Vertu" "du GÃ©nie" "du Travail" "de la Raison" "des RÃ©compenses" "de la RÃ©volution"] (#$ . 2540))
#@52 Return non-nil if diacritical marks are available.
(defalias 'calendar-french-accents-p #[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 (#$ . 2770)])
#@78 Return the array of month names, depending on whether accents are available.
(defalias 'calendar-french-month-name-array #[nil "\302 \203\207	\207" [calendar-french-multibyte-month-name-array calendar-french-month-name-array calendar-french-accents-p] 1 (#$ . 3059)])
#@32 Return the array of day names.
(defalias 'calendar-french-day-name-array #[nil "\207" [calendar-french-day-name-array] 1 (#$ . 3336)])
#@75 Return the special day names, depending on whether accents are available.
(defalias 'calendar-french-special-days-array #[nil "\302 \203\207	\207" [calendar-french-multibyte-special-days-array calendar-french-special-days-array calendar-french-accents-p] 1 (#$ . 3478)])
#@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 'calendar-french-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 (#$ . 3759)])
#@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 'calendar-french-last-day-of-month #[(month year) "\302W\203\303\207\304	!\203\305\207\306\207" [month year 13 30 calendar-french-leap-year-p 6 5] 2 (#$ . 4441)])
#@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-french-to-absolute #[(date) "\211@)\211\211A@*\3068)\307\nS\310_\n\311W\203'\n\312\245\202;\307\nS\312\245\nS\313\245[\nS\314\245\nS\315\245[$\fS\316_
S%+\207" [date x year day month calendar-french-epoch 2 + 365 20 4 100 400 4000 30] 9 (#$ . 4816)])
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias calendar-absolute-from-french calendar-french-to-absolute nil make-obsolete "23.1"] 4)
#@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\203OTT\2024*T\f\310\f\311
E!SZ
\f

E,\207" [date calendar-french-epoch approx sum y year 0 366 calendar-french-to-absolute 1 calendar-french-last-day-of-month m month day] 7 (#$ . 5432)])
#@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\3108)\311\312\n!\203\313\314!\202p\n\315V\203\231\nS\316\211\211@)\211\211A@*\3108)
S\317_\\$\310V\203\205$\320\321_\\\322\245Z$\n\211\315W\203f\323\n!S\312\n\321\246!\205|\312\n\324\246!?\206|\312\n\325\246!)\203\205$T$$-	\326_	\321\245	\324\245[	\325\245%\202p\323\nT!\327\211\211@)\211\211A@*\3108)
S\317_\\$\310V\203\375$\320\321_\\\322\245Z$\n\211\315W\203\336\323\n!S\312\n\321\246!\205\364\312\n\324\246!?\206\364\312\n\325\246!)\203\375$T$$-	\326_	\321\245	\324\245[	\325\245\330\211\330@)\211\211A@*\3108)
S\317_\\$\310V\203k$\320\321_\\\322\245Z$\n\211\315W\203L\323\n!S\312\n\321\246!\205b\312\n\324\246!?\206b\312\n\325\246!)\203k$T$$-&+!\211%\3108)&%\211@)'%\211\211A@*(&\331W\203\232\332\202\316'\333U\203\270\334\335 \203\253\336\202\254\337\340 (SH&#\202\316\334\335 \203\302\341\202\303\342(\343 'SH&$,\207" [date offset-years year month x day calendar-french-from-absolute calendar-current-date 2 nil zerop error "There was no year zero" 0 + 31 23 4 10 abs 100 400 365 - (12 31 -1) 1 "" 13 format calendar-french-accents-p "Jour %s de l'AnnÃ©e %d de la RÃ©volution" "Jour %s de l'Anne'e %d de la Re'volution" calendar-french-special-days-array "%d %s an %d de la RÃ©volution" "%d %s an %d de la Re'volution" calendar-french-month-name-array day-of-year french-date y m d] 12 (#$ . 6051)])
#@73 Show the French Revolutionary calendar equivalent of the selected date.
(defalias 'calendar-french-print-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 (#$ . 7730) nil])
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias calendar-print-french-date calendar-french-print-date nil make-obsolete "23.1"] 4)
#@105 Move cursor to French Revolutionary date DATE.
Echo French Revolutionary date unless NOECHO is non-nil.
(defalias 'calendar-french-goto-date #[(date &optional noecho) "\302\303\304!!!\210	\206\305 \207" [date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-french-to-absolute calendar-french-print-date] 4 (#$ . 8222) (let* ((months (calendar-french-month-name-array)) (special-days (calendar-french-special-days-array)) (year (progn (calendar-read (if (calendar-french-accents-p) "AnnÃ©e de la RÃ©volution (>0): " "Anne'e de la Re'volution (>0): ") (lambda (x) (> x 0)) (number-to-string (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 (lambda (x) (concat "Jour " x)) calendar-french-special-days-array) (reverse (cdr (reverse (mapcar (lambda (x) (concat "Jour " x)) special-days)))))))) (completion-ignore-case t) (month (cdr (assoc-string (completing-read "Mois ou Sansculottide: " month-list nil t) (calendar-make-alist month-list 1 'car) t))) (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)))])
(byte-code "\300\301\302\303#\210\304\301\302\305#\207" [defalias calendar-goto-french-date calendar-french-goto-date nil make-obsolete "23.1"] 4)
#@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 (#$ . 9680)])
(provide 'cal-french)
