annotate lisp/calendar/cal-coptic.el @ 94627:9cc7bc51e055

(vc-rcs-fetch-master-state): Fix inf-loop.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 05 May 2008 06:38:04 +0000
parents bf9ef749c23e
children e49abd957e81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38422
7a94f1c588c4 Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 24190
diff changeset
1 ;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
2
92966
446f7aee7bf1 (coptic-calendar-epoch): Doc fix.
Glenn Morris <rgm@gnu.org>
parents: 92897
diff changeset
3 ;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
446f7aee7bf1 (coptic-calendar-epoch): Doc fix.
Glenn Morris <rgm@gnu.org>
parents: 92897
diff changeset
4 ;; 2008 Free Software Foundation, Inc.
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
5
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
67465
a55ee709ec8d Update copyright pending Emacs 22.
Glenn Morris <rgm@gnu.org>
parents: 65145
diff changeset
7 ;; Maintainer: Glenn Morris <rgm@gnu.org>
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
8 ;; Keywords: calendar
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
9 ;; Human-Keywords: Coptic calendar, Ethiopic calendar, calendar, diary
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
10
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
11 ;; This file is part of GNU Emacs.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
12
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
13 ;; GNU Emacs is free software; you can redistribute it and/or modify
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
14 ;; it under the terms of the GNU General Public License as published by
78216
93e11478c954 Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 77279
diff changeset
15 ;; the Free Software Foundation; either version 3, or (at your option)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
16 ;; any later version.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
17
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
18 ;; GNU Emacs is distributed in the hope that it will be useful,
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
21 ;; GNU General Public License for more details.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
22
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
23 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 13575
diff changeset
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 61148
diff changeset
25 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 61148
diff changeset
26 ;; Boston, MA 02110-1301, USA.
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
27
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
28 ;;; Commentary:
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
29
93478
022b9c621dbe (Commentary): Point to calendar.el.
Glenn Morris <rgm@gnu.org>
parents: 93221
diff changeset
30 ;; See calendar.el.
20462
d179de7ad92e Add reference to new Calendrical Calculations book.
Paul Eggert <eggert@twinsun.com>
parents: 20209
diff changeset
31
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
32 ;;; Code:
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
33
93221
546789da9d8f Require calendar rather than cal-julian.
Glenn Morris <rgm@gnu.org>
parents: 93182
diff changeset
34 (require 'calendar)
65145
ac895e21e622 (date): Add defvar.
Juanma Barranquero <lekktu@gmail.com>
parents: 64085
diff changeset
35
92613
28583a8ab749 (coptic-name): Add doc string.
Glenn Morris <rgm@gnu.org>
parents: 92580
diff changeset
36 ;; Not constants because they get let-bound.
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
37
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
38 (defvar calendar-coptic-month-name-array
14568
60730f9e6b80 Coorect Ethiopic epoch and some spelling errors.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
39 ["Tut" "Babah" "Hatur" "Kiyahk" "Tubah" "Amshir" "Baramhat" "Barmundah"
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
40 "Bashans" "Baunah" "Abib" "Misra" "al-Nasi"]
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
41 "Array of the month names in the Coptic calendar.")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
42
93221
546789da9d8f Require calendar rather than cal-julian.
Glenn Morris <rgm@gnu.org>
parents: 93182
diff changeset
43 (eval-and-compile
93638
bab9812286c1 Update for cal-julian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93478
diff changeset
44 (autoload 'calendar-julian-to-absolute "cal-julian"))
93221
546789da9d8f Require calendar rather than cal-julian.
Glenn Morris <rgm@gnu.org>
parents: 93182
diff changeset
45
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
46 (defvar calendar-coptic-epoch
93638
bab9812286c1 Update for cal-julian name changes.
Glenn Morris <rgm@gnu.org>
parents: 93478
diff changeset
47 (eval-when-compile (calendar-julian-to-absolute '(8 29 284)))
92966
446f7aee7bf1 (coptic-calendar-epoch): Doc fix.
Glenn Morris <rgm@gnu.org>
parents: 92897
diff changeset
48 "Absolute date of start of Coptic calendar = August 29, 284 AD (Julian).")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
49
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
50 (defvar calendar-coptic-name "Coptic"
92613
28583a8ab749 (coptic-name): Add doc string.
Glenn Morris <rgm@gnu.org>
parents: 92580
diff changeset
51 "Used in some message strings.")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
52
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
53 (defun calendar-coptic-leap-year-p (year)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
54 "True if YEAR is a leap year on the Coptic calendar."
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
55 (zerop (mod (1+ year) 4)))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
56
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
57 (defun calendar-coptic-last-day-of-month (month year)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
58 "Return last day of MONTH, YEAR on the Coptic calendar.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
59 The 13th month is not really a month, but the 5 (6 in leap years) day period of
92627
73ee52037e9a Formatting changes only.
Glenn Morris <rgm@gnu.org>
parents: 92622
diff changeset
60 Nisi (Kebus) at the end of the year."
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
61 (if (< month 13)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
62 30
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
63 (if (calendar-coptic-leap-year-p year)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
64 6
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
65 5)))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
66
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
67 (defun calendar-coptic-to-absolute (date)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
68 "Compute absolute date from Coptic date DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
69 The absolute date is the number of days elapsed since the (imaginary)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
70 Gregorian date Sunday, December 31, 1 BC."
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93780
diff changeset
71 (let ((month (calendar-extract-month date))
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93780
diff changeset
72 (day (calendar-extract-day date))
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93780
diff changeset
73 (year (calendar-extract-year date)))
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
74 (+ (1- calendar-coptic-epoch) ; days before start of calendar
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
75 (* 365 (1- year)) ; days in prior years
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
76 (/ year 4) ; leap days in prior years
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
77 (* 30 (1- month)) ; days in prior months this year
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
78 day))) ; days so far this month
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
79
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
80 (define-obsolete-function-alias 'calendar-absolute-from-coptic
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
81 'calendar-coptic-to-absolute "23.1")
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
82
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
83 (defun calendar-coptic-from-absolute (date)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
84 "Compute the Coptic equivalent for absolute date DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
85 The result is a list of the form (MONTH DAY YEAR).
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
86 The absolute date is the number of days elapsed since the imaginary
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
87 Gregorian date Sunday, December 31, 1 BC."
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
88 (if (< date calendar-coptic-epoch)
92627
73ee52037e9a Formatting changes only.
Glenn Morris <rgm@gnu.org>
parents: 92622
diff changeset
89 (list 0 0 0) ; pre-Coptic date
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
90 (let* ((approx (/ (- date calendar-coptic-epoch)
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
91 366)) ; approximation from below
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
92 (year ; search forward from the approximation
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
93 (+ approx
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
94 (calendar-sum y approx
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
95 (>= date (calendar-coptic-to-absolute
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
96 (list 1 1 (1+ y))))
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
97 1)))
92627
73ee52037e9a Formatting changes only.
Glenn Morris <rgm@gnu.org>
parents: 92622
diff changeset
98 (month ; search forward from Tot
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
99 (1+ (calendar-sum m 1
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
100 (> date
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
101 (calendar-coptic-to-absolute
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
102 (list m
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
103 (calendar-coptic-last-day-of-month m
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
104 year)
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
105 year)))
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
106 1)))
92627
73ee52037e9a Formatting changes only.
Glenn Morris <rgm@gnu.org>
parents: 92622
diff changeset
107 (day ; calculate the day by subtraction
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
108 (- date
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
109 (1- (calendar-coptic-to-absolute (list month 1 year))))))
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
110 (list month day year))))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
111
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
112 ;;;###cal-autoload
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
113 (defun calendar-coptic-date-string (&optional date)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
114 "String of Coptic date of Gregorian DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
115 Returns the empty string if DATE is pre-Coptic calendar.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
116 Defaults to today's date if DATE is not given."
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
117 (let* ((coptic-date (calendar-coptic-from-absolute
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
118 (calendar-absolute-from-gregorian
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
119 (or date (calendar-current-date)))))
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93780
diff changeset
120 (y (calendar-extract-year coptic-date))
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93780
diff changeset
121 (m (calendar-extract-month coptic-date)))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
122 (if (< y 1)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
123 ""
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
124 (let ((monthname (aref calendar-coptic-month-name-array (1- m)))
93844
bf9ef749c23e Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents: 93809
diff changeset
125 (day (number-to-string (calendar-extract-day coptic-date)))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
126 (dayname nil)
93844
bf9ef749c23e Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents: 93809
diff changeset
127 (month (number-to-string m))
bf9ef749c23e Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents: 93809
diff changeset
128 (year (number-to-string y)))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
129 (mapconcat 'eval calendar-date-display-form "")))))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
130
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
131 ;;;###cal-autoload
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
132 (defun calendar-coptic-print-date ()
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
133 "Show the Coptic calendar equivalent of the selected date."
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
134 (interactive)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
135 (let ((f (calendar-coptic-date-string (calendar-cursor-to-date t))))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
136 (if (string-equal f "")
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
137 (message "Date is pre-%s calendar" calendar-coptic-name)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
138 (message "%s date: %s" calendar-coptic-name f))))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
139
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
140 (define-obsolete-function-alias 'calendar-print-coptic-date
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
141 'calendar-coptic-print-date "23.1")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
142
93182
6011e8a7280f (calendar-coptic-read-date): New name for coptic-prompt-for-date.
Glenn Morris <rgm@gnu.org>
parents: 92966
diff changeset
143 (defun calendar-coptic-read-date ()
6011e8a7280f (calendar-coptic-read-date): New name for coptic-prompt-for-date.
Glenn Morris <rgm@gnu.org>
parents: 92966
diff changeset
144 "Interactively read the arguments for a Coptic date command.
6011e8a7280f (calendar-coptic-read-date): New name for coptic-prompt-for-date.
Glenn Morris <rgm@gnu.org>
parents: 92966
diff changeset
145 Reads a year, month, and day."
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
146 (let* ((today (calendar-current-date))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
147 (year (calendar-read
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
148 (format "%s calendar year (>0): " calendar-coptic-name)
92580
2a9b05a547d4 Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents: 79703
diff changeset
149 (lambda (x) (> x 0))
93844
bf9ef749c23e Replace int-to-string with number-to-string.
Glenn Morris <rgm@gnu.org>
parents: 93809
diff changeset
150 (number-to-string
93809
3ff2b47de8f2 Update for calendar.el name changes.
Glenn Morris <rgm@gnu.org>
parents: 93780
diff changeset
151 (calendar-extract-year
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
152 (calendar-coptic-from-absolute
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
153 (calendar-absolute-from-gregorian today))))))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
154 (completion-ignore-case t)
54072
7cd960d120ba (coptic-prompt-for-date): Use assoc-string instead of assoc-ignore-case.
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
155 (month (cdr (assoc-string
24190
77853cf5a2e5 (coptic-prompt-for-date): Use assoc-ignore-case and do not capitalize
Richard M. Stallman <rms@gnu.org>
parents: 20462
diff changeset
156 (completing-read
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
157 (format "%s calendar month name: " calendar-coptic-name)
24190
77853cf5a2e5 (coptic-prompt-for-date): Use assoc-ignore-case and do not capitalize
Richard M. Stallman <rms@gnu.org>
parents: 20462
diff changeset
158 (mapcar 'list
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
159 (append calendar-coptic-month-name-array nil))
24190
77853cf5a2e5 (coptic-prompt-for-date): Use assoc-ignore-case and do not capitalize
Richard M. Stallman <rms@gnu.org>
parents: 20462
diff changeset
160 nil t)
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
161 (calendar-make-alist calendar-coptic-month-name-array
54072
7cd960d120ba (coptic-prompt-for-date): Use assoc-string instead of assoc-ignore-case.
Glenn Morris <rgm@gnu.org>
parents: 52401
diff changeset
162 1) t)))
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
163 (last (calendar-coptic-last-day-of-month month year))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
164 (day (calendar-read
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
165 (format "%s calendar day (1-%d): " calendar-coptic-name last)
92580
2a9b05a547d4 Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents: 79703
diff changeset
166 (lambda (x) (and (< 0 x) (<= x last))))))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
167 (list (list month day year))))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
168
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
169 (define-obsolete-function-alias 'coptic-prompt-for-date
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
170 'calendar-coptic-read-date "23.1")
93182
6011e8a7280f (calendar-coptic-read-date): New name for coptic-prompt-for-date.
Glenn Morris <rgm@gnu.org>
parents: 92966
diff changeset
171
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
172 ;;;###cal-autoload
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
173 (defun calendar-coptic-goto-date (date &optional noecho)
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
174 "Move cursor to Coptic date DATE.
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
175 Echo Coptic date unless NOECHO is t."
93182
6011e8a7280f (calendar-coptic-read-date): New name for coptic-prompt-for-date.
Glenn Morris <rgm@gnu.org>
parents: 92966
diff changeset
176 (interactive (calendar-coptic-read-date))
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
177 (calendar-goto-date (calendar-gregorian-from-absolute
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
178 (calendar-coptic-to-absolute date)))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
179 (or noecho (calendar-coptic-print-date)))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
180
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
181 (define-obsolete-function-alias 'calendar-goto-coptic-date
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
182 'calendar-coptic-goto-date "23.1")
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
183
92622
a7f58647496a Fix previous change.
Glenn Morris <rgm@gnu.org>
parents: 92613
diff changeset
184 (defvar date)
a7f58647496a Fix previous change.
Glenn Morris <rgm@gnu.org>
parents: 92613
diff changeset
185
93780
4b211889759d Comment.
Glenn Morris <rgm@gnu.org>
parents: 93716
diff changeset
186 ;; To be called from diary-list-sexp-entries, where DATE is bound.
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
187 ;;;###diary-autoload
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
188 (defun diary-coptic-date ()
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
189 "Coptic calendar equivalent of date diary entry."
17383
dade44f8a6b0 (diary-coptic-date): Use `date'.
Richard M. Stallman <rms@gnu.org>
parents: 14568
diff changeset
190 (let ((f (calendar-coptic-date-string date)))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
191 (if (string-equal f "")
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
192 (format "Date is pre-%s calendar" calendar-coptic-name)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
193 (format "%s date: %s" calendar-coptic-name f))))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
194
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
195 (defconst calendar-ethiopic-month-name-array
14568
60730f9e6b80 Coorect Ethiopic epoch and some spelling errors.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 14169
diff changeset
196 ["Maskaram" "Teqemt" "Khedar" "Takhsas" "Ter" "Yakatit" "Magabit" "Miyazya"
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
197 "Genbot" "Sane" "Hamle" "Nahas" "Paguem"]
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
198 "Array of the month names in the Ethiopic calendar.")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
199
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
200 (defconst calendar-ethiopic-epoch 2796
20209
fd00ceeb06c6 (ethiopic-calendar-epoch): Correct to 8 CE.
Karl Heuer <kwzh@gnu.org>
parents: 17571
diff changeset
201 "Absolute date of start of Ethiopic calendar = August 29, 8 C.E. (Julian).")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
202
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
203 (defconst calendar-ethiopic-name "Ethiopic"
92897
478f528ad208 Re-indent.
Glenn Morris <rgm@gnu.org>
parents: 92828
diff changeset
204 "Used in some message strings.")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
205
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
206 (defun calendar-ethiopic-to-absolute (date)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
207 "Compute absolute date from Ethiopic date DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
208 The absolute date is the number of days elapsed since the (imaginary)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
209 Gregorian date Sunday, December 31, 1 BC."
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
210 (let ((calendar-coptic-epoch calendar-ethiopic-epoch))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
211 (calendar-coptic-to-absolute date)))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
212
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
213 (define-obsolete-function-alias 'calendar-absolute-from-ethiopic
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
214 'calendar-ethiopic-to-absolute "23.1")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
215
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
216 (defun calendar-ethiopic-from-absolute (date)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
217 "Compute the Ethiopic equivalent for absolute date DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
218 The result is a list of the form (MONTH DAY YEAR).
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
219 The absolute date is the number of days elapsed since the imaginary
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
220 Gregorian date Sunday, December 31, 1 BC."
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
221 (let ((calendar-coptic-epoch calendar-ethiopic-epoch))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
222 (calendar-coptic-from-absolute date)))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
223
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
224 ;;;###cal-autoload
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
225 (defun calendar-ethiopic-date-string (&optional date)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
226 "String of Ethiopic date of Gregorian DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
227 Returns the empty string if DATE is pre-Ethiopic calendar.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
228 Defaults to today's date if DATE is not given."
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
229 (let ((calendar-coptic-epoch calendar-ethiopic-epoch)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
230 (calendar-coptic-name calendar-ethiopic-name)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
231 (calendar-coptic-month-name-array calendar-ethiopic-month-name-array))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
232 (calendar-coptic-date-string date)))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
233
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
234 ;;;###cal-autoload
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
235 (defun calendar-ethiopic-print-date ()
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
236 "Show the Ethiopic calendar equivalent of the selected date."
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
237 (interactive)
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
238 (let ((calendar-coptic-epoch calendar-ethiopic-epoch)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
239 (calendar-coptic-name calendar-ethiopic-name)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
240 (calendar-coptic-month-name-array calendar-ethiopic-month-name-array))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
241 (call-interactively 'calendar-coptic-print-date)))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
242
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
243 (define-obsolete-function-alias 'calendar-print-ethiopic-date
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
244 'calendar-ethiopic-print-date "23.1")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
245
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
246 ;;;###cal-autoload
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
247 (defun calendar-ethiopic-goto-date (date &optional noecho)
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
248 "Move cursor to Ethiopic date DATE.
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
249 Echo Ethiopic date unless NOECHO is t."
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
250 (interactive
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
251 (let ((calendar-coptic-epoch calendar-ethiopic-epoch)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
252 (calendar-coptic-name calendar-ethiopic-name)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
253 (calendar-coptic-month-name-array calendar-ethiopic-month-name-array))
93182
6011e8a7280f (calendar-coptic-read-date): New name for coptic-prompt-for-date.
Glenn Morris <rgm@gnu.org>
parents: 92966
diff changeset
254 (calendar-coptic-read-date)))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
255 (calendar-goto-date (calendar-gregorian-from-absolute
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
256 (calendar-ethiopic-to-absolute date)))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
257 (or noecho (calendar-ethiopic-print-date)))
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
258
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
259 (define-obsolete-function-alias 'calendar-goto-ethiopic-date
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
260 'calendar-ethiopic-goto-date "23.1")
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
261
93780
4b211889759d Comment.
Glenn Morris <rgm@gnu.org>
parents: 93716
diff changeset
262 ;; To be called from diary-list-sexp-entries, where DATE is bound.
92828
5d415a63a344 (generated-autoload-file): Don't set, instead use different values of
Glenn Morris <rgm@gnu.org>
parents: 92627
diff changeset
263 ;;;###diary-autoload
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
264 (defun diary-ethiopic-date ()
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
265 "Ethiopic calendar equivalent of date diary entry."
93716
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
266 (let ((calendar-coptic-epoch calendar-ethiopic-epoch)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
267 (calendar-coptic-name calendar-ethiopic-name)
144a6495a5a4 (calendar-coptic-month-name-array): Rename coptic-calendar-month-name-array.
Glenn Morris <rgm@gnu.org>
parents: 93638
diff changeset
268 (calendar-coptic-month-name-array calendar-ethiopic-month-name-array))
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
269 (diary-coptic-date)))
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
270
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
271 (provide 'cal-coptic)
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
272
92580
2a9b05a547d4 Unquote lambda functions. Add autoload cookies to functions formerly
Glenn Morris <rgm@gnu.org>
parents: 79703
diff changeset
273 ;; arch-tag: 72d49161-25df-4072-9312-b182cdca7627
13053
621d48117fde Initial revision
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents:
diff changeset
274 ;;; cal-coptic.el ends here