-;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars.
+;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars
-;; Copyright (C) 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+;; Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
+;; Maintainer: Glenn Morris <rgm@gnu.org>
;; Keywords: calendar
;; Human-Keywords: Coptic calendar, Ethiopic calendar, calendar, diary
;; 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 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; 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:
;; This collection of functions implements the features of calendar.el and
;; diary.el that deal with the Coptic and Ethiopic calendars.
-;; Comments, corrections, and improvements should be sent to
-;; Edward M. Reingold Department of Computer Science
-;; (217) 333-6733 University of Illinois at Urbana-Champaign
-;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
-;; Urbana, Illinois 61801
+;; Technical details of all the calendrical calculations can be found in
+;; ``Calendrical Calculations: The Millennium Edition'' by Edward M. Reingold
+;; and Nachum Dershowitz, Cambridge University Press (2001).
;;; Code:
+(defvar date)
+
(require 'cal-julian)
(defvar coptic-calendar-month-name-array
(defvar coptic-calendar-epoch (calendar-absolute-from-julian '(8 29 284))
"Absolute date of start of Coptic calendar = August 29, 284 A.D. (Julian).")
-(defconst coptic-name "Coptic")
+(defvar coptic-name "Coptic")
(defun coptic-calendar-leap-year-p (year)
"True if YEAR is a leap year on the Coptic calendar."
(/ year 4) ;; Leap days in prior years
(* 30 (1- month)) ;; Days in prior months this year
day))) ;; Days so far this month
-
+
(defun calendar-coptic-from-absolute (date)
"Compute the Coptic equivalent for absolute date DATE.
(calendar-coptic-from-absolute
(calendar-absolute-from-gregorian today))))))
(completion-ignore-case t)
- (month (cdr (assoc
- (capitalize
- (completing-read
- (format "%s calendar month name: " coptic-name)
- (mapcar 'list
- (append coptic-calendar-month-name-array nil))
- nil t))
+ (month (cdr (assoc-string
+ (completing-read
+ (format "%s calendar month name: " coptic-name)
+ (mapcar 'list
+ (append coptic-calendar-month-name-array nil))
+ nil t)
(calendar-make-alist coptic-calendar-month-name-array
- 1 'capitalize))))
+ 1) t)))
(last (coptic-calendar-last-day-of-month month year))
(day (calendar-read
(format "%s calendar day (1-%d): " coptic-name last)
["Maskaram" "Teqemt" "Khedar" "Takhsas" "Ter" "Yakatit" "Magabit" "Miyazya"
"Genbot" "Sane" "Hamle" "Nahas" "Paguem"])
-(defconst ethiopic-calendar-epoch 2430
- "Absolute date of start of Ethiopic calendar = August 29, 7 C.E. (Julian).")
+(defconst ethiopic-calendar-epoch 2796
+ "Absolute date of start of Ethiopic calendar = August 29, 8 C.E. (Julian).")
(defconst ethiopic-name "Ethiopic")
(provide 'cal-coptic)
+;;; arch-tag: 72d49161-25df-4072-9312-b182cdca7627
;;; cal-coptic.el ends here