[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v |
Date: |
Fri, 14 Mar 2008 02:50:00 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 08/03/14 02:50:00
Index: cal-coptic.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-coptic.el,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- cal-coptic.el 13 Mar 2008 05:40:55 -0000 1.28
+++ cal-coptic.el 14 Mar 2008 02:49:59 -0000 1.29
@@ -42,7 +42,8 @@
(defvar coptic-calendar-month-name-array
["Tut" "Babah" "Hatur" "Kiyahk" "Tubah" "Amshir" "Baramhat" "Barmundah"
- "Bashans" "Baunah" "Abib" "Misra" "al-Nasi"])
+ "Bashans" "Baunah" "Abib" "Misra" "al-Nasi"]
+ "Array of the month names in the Coptic calendar.")
(defvar coptic-calendar-epoch (calendar-absolute-from-julian '(8 29 284))
"Absolute date of start of Coptic calendar = August 29, 284 A.D. (Julian).")
@@ -77,7 +78,6 @@
(* 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.
The result is a list of the form (MONTH DAY YEAR).
@@ -90,14 +90,16 @@
(year ; search forward from the approximation
(+ approx
(calendar-sum y approx
- (>= date (calendar-absolute-from-coptic (list 1 1 (1+ y))))
+ (>= date (calendar-absolute-from-coptic
+ (list 1 1 (1+ y))))
1)))
(month ; search forward from Tot
(1+ (calendar-sum m 1
(> date
(calendar-absolute-from-coptic
(list m
- (coptic-calendar-last-day-of-month m year)
+ (coptic-calendar-last-day-of-month m
+
year)
year)))
1)))
(day ; calculate the day by subtraction
@@ -133,15 +135,6 @@
(message "Date is pre-%s calendar" coptic-name)
(message "%s date: %s" coptic-name f))))
-;;;###cal-autoload
-(defun calendar-goto-coptic-date (date &optional noecho)
- "Move cursor to Coptic date DATE.
-Echo Coptic date unless NOECHO is t."
- (interactive (coptic-prompt-for-date))
- (calendar-goto-date (calendar-gregorian-from-absolute
- (calendar-absolute-from-coptic date)))
- (or noecho (calendar-print-coptic-date)))
-
(defun coptic-prompt-for-date ()
"Ask for a Coptic date."
(let* ((today (calendar-current-date))
@@ -167,6 +160,15 @@
(lambda (x) (and (< 0 x) (<= x last))))))
(list (list month day year))))
+;;;###cal-autoload
+(defun calendar-goto-coptic-date (date &optional noecho)
+ "Move cursor to Coptic date DATE.
+Echo Coptic date unless NOECHO is t."
+ (interactive (coptic-prompt-for-date))
+ (calendar-goto-date (calendar-gregorian-from-absolute
+ (calendar-absolute-from-coptic date)))
+ (or noecho (calendar-print-coptic-date)))
+
(defvar date)
;; To be called from list-sexp-diary-entries, where DATE is bound.
@@ -180,12 +182,14 @@
(defconst ethiopic-calendar-month-name-array
["Maskaram" "Teqemt" "Khedar" "Takhsas" "Ter" "Yakatit" "Magabit" "Miyazya"
- "Genbot" "Sane" "Hamle" "Nahas" "Paguem"])
+ "Genbot" "Sane" "Hamle" "Nahas" "Paguem"]
+ "Array of the month names in the Ethiopic calendar.")
(defconst ethiopic-calendar-epoch 2796
"Absolute date of start of Ethiopic calendar = August 29, 8 C.E. (Julian).")
-(defconst ethiopic-name "Ethiopic")
+(defconst ethiopic-name "Ethiopic"
+ "Used in some message strings.")
(defun calendar-absolute-from-ethiopic (date)
"Compute absolute date from Ethiopic date DATE.
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/07
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/07
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/08
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/08
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/13
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v,
Glenn Morris <=
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/14
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/24
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/25
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-coptic.el,v, Glenn Morris, 2008/03/31