;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars
-;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2011 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
+;; 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:
"Compute absolute date from Coptic 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)))
(+ (1- calendar-coptic-epoch) ; days before start of calendar
(* 365 (1- year)) ; days in prior years
(/ year 4) ; leap days in prior years
(let* ((coptic-date (calendar-coptic-from-absolute
(calendar-absolute-from-gregorian
(or date (calendar-current-date)))))
- (y (extract-calendar-year coptic-date))
- (m (extract-calendar-month coptic-date)))
+ (y (calendar-extract-year coptic-date))
+ (m (calendar-extract-month coptic-date)))
(if (< y 1)
""
(let ((monthname (aref calendar-coptic-month-name-array (1- m)))
- (day (int-to-string (extract-calendar-day coptic-date)))
+ (day (number-to-string (calendar-extract-day coptic-date)))
(dayname nil)
- (month (int-to-string m))
- (year (int-to-string y)))
+ (month (number-to-string m))
+ (year (number-to-string y)))
(mapconcat 'eval calendar-date-display-form "")))))
;;;###cal-autoload
(year (calendar-read
(format "%s calendar year (>0): " calendar-coptic-name)
(lambda (x) (> x 0))
- (int-to-string
- (extract-calendar-year
+ (number-to-string
+ (calendar-extract-year
(calendar-coptic-from-absolute
(calendar-absolute-from-gregorian today))))))
(completion-ignore-case t)
(defvar date)
-;; To be called from list-sexp-diary-entries, where DATE is bound.
+;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-coptic-date ()
"Coptic calendar equivalent of date diary entry."
(define-obsolete-function-alias 'calendar-goto-ethiopic-date
'calendar-ethiopic-goto-date "23.1")
-;; To be called from list-sexp-diary-entries, where DATE is bound.
+;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-ethiopic-date ()
"Ethiopic calendar equivalent of date diary entry."
(provide 'cal-coptic)
-;; arch-tag: 72d49161-25df-4072-9312-b182cdca7627
;;; cal-coptic.el ends here