-;;; cal-french.el --- calendar functions for the French Revolutionary calendar.
+;;; cal-french.el --- calendar functions for the French Revolutionary calendar
-;; Copyright (C) 1988, 89, 92, 94, 95, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1989, 1992, 1994, 1995, 1997, 2001, 2002, 2003,
+;; 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
+;; Maintainer: Glenn Morris <rgm@gnu.org>
;; Keywords: calendar
;; Human-Keywords: French Revolutionary calendar, calendar, diary
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;; diary.el that deal with the French Revolutionary calendar.
;; Technical details of the French Revolutionary calendar can be found in
-;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
-;; Cambridge University Press (1997), and in
+;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
+;; and Nachum Dershowitz, Cambridge University Press (2001), and in
;; ``Calendrical Calculations, Part II: Three Historical Calendars'' by
;; E. M. Reingold, N. Dershowitz, and S. M. Clamen, Software--Practice and
;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404.
;;; Code:
+(defvar date)
+
(require 'calendar)
(defun french-calendar-accents ()
"Octidi" "Nonidi" "Decadi"])
(defconst french-calendar-multibyte-special-days-array
- ["de la Vertu" "du Génie" "du Labour" "de la Raison" "de la Récompense"
+ ["de la Vertu" "du Génie" "du Travail" "de la Raison" "des Récompenses"
"de la Révolution"])
(defconst french-calendar-special-days-array
- ["de la Vertu" "du Ge'nie" "du Labour" "de la Raison" "de la Re'compense"
+ ["de la Vertu" "du Ge'nie" "du Travail" "de la Raison" "des Re'compenses"
"de la Re'volution"])
(defun french-calendar-month-name-array ()
y))
(t (format
(if (french-calendar-accents)
- "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 (1+ (/ (1- d) 10)) ?I)
- (aref (french-calendar-day-name-array) (% (1- d) 10))
+ "%d %s an %d de la Révolution"
+ "%d %s an %d de la Re'volution")
+ d
(aref (french-calendar-month-name-array) (1- m))
y)))))
(concat "Jour " x))
special-days))))))))
(completion-ignore-case t)
- (month (cdr (assoc-ignore-case
+ (month (cdr (assoc-string
(completing-read
"Mois ou Sansculottide: "
month-list
nil t)
- (calendar-make-alist month-list 1 'car))))
- (decade (if (> month 12)
- 1
- (calendar-read
- (if accents
- "Décade (1-3): "
- "De'cade (1-3): ")
- '(lambda (x) (memq x '(1 2 3))))))
+ (calendar-make-alist month-list 1 'car) t)))
(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)))))
+ "Jour (1-30): "
+ '(lambda (x) (and (<= 1 x) (<= x 30))))))
+ (month (if (> month 12) 13 month)))
(list (list month day year)))))
(calendar-goto-date (calendar-gregorian-from-absolute
(calendar-absolute-from-french date)))
(provide 'cal-french)
+;;; arch-tag: 7e8045a3-8609-46b5-9cde-cf40ce541cf9
;;; cal-french.el ends here