]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-french.el
(appt-display-format): Default value must be
[gnu-emacs] / lisp / calendar / cal-french.el
index 9972f3ce22d2fbd8eef9de12dbdea59ab6e5220d..0d88f161a033c19b947b8b9882356063827414c5 100644 (file)
@@ -1,8 +1,10 @@
-;;; 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
 
@@ -20,8 +22,8 @@
 
 ;; 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:
 
@@ -29,8 +31,8 @@
 ;; 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.
@@ -43,6 +45,8 @@
 
 ;;; 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 ()
@@ -180,10 +184,9 @@ Defaults to today's date if DATE is not given."
                        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)))))
 
@@ -229,30 +232,18 @@ Echo French Revolutionary date unless NOECHO is t."
                                      (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))))))
+           (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-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)))
@@ -267,4 +258,5 @@ Echo French Revolutionary date unless NOECHO is t."
 
 (provide 'cal-french)
 
+;;; arch-tag: 7e8045a3-8609-46b5-9cde-cf40ce541cf9
 ;;; cal-french.el ends here