]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-coptic.el
(mark-fortran-subprogram): Activate mark
[gnu-emacs] / lisp / calendar / cal-coptic.el
index 04b786ec84c0d2320c67c16b49cf78218208719f..c43478a598a186d34a55a1604d3aa24b39d8c20b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars.
 
-;; Copyright (C) 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997 Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Keywords: calendar
 ;; 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; 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.
 
 ;;; Commentary:
 
 ;; This collection of functions implements the features of calendar.el and
 ;; diary.el that deal with the Coptic and Ethiopic calendars.
 
+;; Technical details of all the calendrical calculations can be found in
+;; ``Calendrical Calculations'' by Nachum Dershowitz and Edward M. Reingold,
+;; Cambridge University Press (1997).
+
 ;; Comments, corrections, and improvements should be sent to
 ;;  Edward M. Reingold               Department of Computer Science
 ;;  (217) 333-6733                   University of Illinois at Urbana-Champaign
@@ -38,8 +43,8 @@
 (require 'cal-julian)
 
 (defvar coptic-calendar-month-name-array
-  ["Tot" "Babe" "Hatur" "Kihak" "Tube" "Amshir" "Baramhat" "Barmuda"
-   "Bashnas" "Bauna" "Abib" "Misra" "Nisi"])
+  ["Tut" "Babah" "Hatur" "Kiyahk" "Tubah" "Amshir" "Baramhat" "Barmundah"
+   "Bashans" "Baunah" "Abib" "Misra" "al-Nasi"])
 
 (defvar coptic-calendar-epoch (calendar-absolute-from-julian '(8 29 284))
   "Absolute date of start of Coptic calendar = August 29, 284 A.D. (Julian).")
@@ -125,7 +130,7 @@ Defaults to today's date if DATE is not given."
   (let ((f (calendar-coptic-date-string (calendar-cursor-to-date t))))
     (if (string-equal f "")
         (message "Date is pre-%s calendar" coptic-name)
-      (message f))))
+      (message "%s date: %s" coptic-name f))))
 
 (defun calendar-goto-coptic-date (date &optional noecho)
   "Move cursor to Coptic date DATE.
@@ -146,15 +151,14 @@ Echo Coptic date unless NOECHO is t."
                   (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-ignore-case
+                      (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))))
          (last (coptic-calendar-last-day-of-month month year))
          (day (calendar-read
                (format "%s calendar day (1-%d): " coptic-name last)
@@ -163,17 +167,17 @@ Echo Coptic date unless NOECHO is t."
 
 (defun diary-coptic-date ()
   "Coptic calendar equivalent of date diary entry."
-  (let ((f (calendar-coptic-date-string (calendar-cursor-to-date t))))
+  (let ((f (calendar-coptic-date-string date)))
     (if (string-equal f "")
         (format "Date is pre-%s calendar" coptic-name)
-      f)))
+      (format "%s date: %s" coptic-name f))))
 
 (defconst ethiopic-calendar-month-name-array
-  ["Maskarram" "Tekemt" "Hadar" "Tahsas" "Tarr" "Yekatit" "Magawit" "Miaziah"
-   "Genbot" "Sanni" "Hamle" "Nas'hi" "Pagnem"])
+  ["Maskaram" "Teqemt" "Khedar" "Takhsas" "Ter" "Yakatit" "Magabit" "Miyazya"
+   "Genbot" "Sane" "Hamle" "Nahas" "Paguem"])
 
-(defconst ethiopic-calendar-epoch (calendar-absolute-from-julian '(8 29 7))
-  "Absolute date of start of Ethiopic calendar = August 29, 7 A.D. (Julian).")
+(defconst ethiopic-calendar-epoch 2796
+  "Absolute date of start of Ethiopic calendar = August 29, 8 C.E. (Julian).")
 
 (defconst ethiopic-name "Ethiopic")