]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-julian.el
from trunk
[gnu-emacs] / lisp / calendar / cal-julian.el
index af66c31e4c2f12e8069678638be9c49f97f19744..d1cea19be4003b479f97dce743b507f05457ae87 100644 (file)
@@ -1,7 +1,7 @@
 ;;; cal-julian.el --- calendar functions for the Julian calendar
 
 ;; Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008  Free Software Foundation, Inc.
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
 
 ;; 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
@@ -21,9 +21,7 @@
 ;; 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:
 
@@ -36,8 +34,8 @@
 (defun calendar-julian-to-absolute (date)
   "The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.
 The Gregorian date Sunday, December 31, 1 BC is imaginary."
-  (let ((month (extract-calendar-month date))
-        (year (extract-calendar-year date)))
+  (let ((month (calendar-extract-month date))
+        (year (calendar-extract-year date)))
     (+ (calendar-day-number date)
        (if (and (zerop (% year 100))
                 (not (zerop (% year 400)))
@@ -106,8 +104,8 @@ Driven by the variable `calendar-date-display-form'."
           (year (calendar-read
                  "Julian calendar year (>0): "
                  (lambda (x) (> x 0))
-                 (int-to-string
-                  (extract-calendar-year
+                 (number-to-string
+                  (calendar-extract-year
                    (calendar-julian-from-absolute
                     (calendar-absolute-from-gregorian
                      today))))))
@@ -170,7 +168,7 @@ nil if it is not visible in the current calendar window."
 (defun calendar-astro-date-string (&optional date)
   "String of astronomical (Julian) day number after noon UTC of Gregorian DATE.
 Defaults to today's date if DATE is not given."
-  (int-to-string
+  (number-to-string
    (ceiling
     (calendar-astro-from-absolute
      (calendar-absolute-from-gregorian (or date (calendar-current-date)))))))
@@ -204,13 +202,13 @@ Echo astronomical (Julian) day number unless NOECHO is non-nil."
 
 (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-julian-date ()
   "Julian calendar equivalent of date diary entry."
   (format "Julian date: %s" (calendar-julian-date-string 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-astro-day-number ()
   "Astronomical (Julian) day number diary entry."