;;; cal-french.el --- calendar functions for the French Revolutionary calendar
-;; Copyright (C) 1988, 1989, 1992, 1994, 1995, 1997, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1988-1989, 1992, 1994-1995, 1997, 2001-2014 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
+;; Package: calendar
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; 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., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
"Array of 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"]
+ ["Vendémiaire" "Brumaire" "Frimaire" "Nivôse" "Pluviôse" "Ventôse"
+ "Germinal" "Floréal" "Prairial" "Messidor" "Thermidor" "Fructidor"]
"Array of multibyte month names in the French calendar.")
(defconst calendar-french-day-name-array
"Array of 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"]
+ ["de la Vertu" "du Génie" "du Travail" "de la Raison" "des Récompenses"
+ "de la Révolution"]
"Array of multibyte special day names in the French calendar.")
(defun calendar-french-accents-p ()
"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."
- (let ((month (extract-calendar-month date))
- (day (extract-calendar-day date))
- (year (extract-calendar-year date)))
+ (let ((month (calendar-extract-month date))
+ (day (calendar-extract-day date))
+ (year (calendar-extract-year date)))
(+ (* 365 (1- year)) ; days in prior years
;; Leap days in prior years.
(if (< year 20)
(let* ((french-date (calendar-french-from-absolute
(calendar-absolute-from-gregorian
(or date (calendar-current-date)))))
- (y (extract-calendar-year french-date))
- (m (extract-calendar-month french-date))
- (d (extract-calendar-day french-date)))
+ (y (calendar-extract-year french-date))
+ (m (calendar-extract-month french-date))
+ (d (calendar-extract-day french-date)))
(cond
((< y 1) "")
((= m 13) (format (if (calendar-french-accents-p)
- "Jour %s de l'Année %d de la Révolution"
+ "Jour %s de l'Année %d de la Révolution"
"Jour %s de l'Anne'e %d de la Re'volution")
(aref (calendar-french-special-days-array) (1- d))
y))
(t (format
(if (calendar-french-accents-p)
- "%d %s an %d de la Révolution"
+ "%d %s an %d de la Révolution"
"%d %s an %d de la Re'volution")
d
(aref (calendar-french-month-name-array) (1- m))
(year (progn
(calendar-read
(if (calendar-french-accents-p)
- "Année de la Révolution (>0): "
+ "Année de la Révolution (>0): "
"Anne'e de la Re'volution (>0): ")
(lambda (x) (> x 0))
- (int-to-string
- (extract-calendar-year
+ (number-to-string
+ (calendar-extract-year
(calendar-french-from-absolute
(calendar-absolute-from-gregorian
(calendar-current-date))))))))
(provide 'cal-french)
-;; arch-tag: 7e8045a3-8609-46b5-9cde-cf40ce541cf9
+;; Local Variables:
+;; coding: utf-8
+;; End:
+
;;; cal-french.el ends here