changeset 2106:f90250f69413

* cal-mayan.el (calendar-mayan-haab-on-or-before, calendar-mayan-tzolkin-on-or-before): Change `mod' to `%'. * cal-mayan.el (calendar-next-tzolkin-date): Delete bogus second defun.
author Jim Blandy <jimb@redhat.com>
date Thu, 11 Mar 1993 07:03:17 +0000
parents 844e027dc6db
children 1c718ee07ac9
files lisp/calendar/cal-mayan.el
diffstat 1 files changed, 10 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-mayan.el	Thu Mar 11 07:02:13 1993 +0000
+++ b/lisp/calendar/cal-mayan.el	Thu Mar 11 07:03:17 1993 +0000
@@ -139,11 +139,11 @@
 
 (defun calendar-mayan-haab-on-or-before (haab-date date)
   "Absolute date of latest HAAB-DATE on or before absolute DATE."
-    (- date
-       (mod (- date
-               (calendar-mayan-haab-difference
-                (calendar-mayan-haab-from-absolute 0) haab-date))
-            365)))
+  (- date
+     (% (- date
+	   (calendar-mayan-haab-difference
+	    (calendar-mayan-haab-from-absolute 0) haab-date))
+	365)))
 
 (defun calendar-next-haab-date (haab-date &optional noecho)
   "Move cursor to next instance of Mayan HAAB-DATE. 
@@ -202,11 +202,11 @@
 
 (defun calendar-mayan-tzolkin-on-or-before (tzolkin-date date)
   "Absolute date of latest TZOLKIN-DATE on or before absolute DATE."
-    (- date
-       (mod (- date (calendar-mayan-tzolkin-difference
-                     (calendar-mayan-tzolkin-from-absolute 0)
-                     tzolkin-date))
-            260)))
+  (- date
+     (% (- date (calendar-mayan-tzolkin-difference
+		 (calendar-mayan-tzolkin-from-absolute 0)
+		 tzolkin-date))
+	260)))
 
 (defun calendar-next-tzolkin-date (tzolkin-date &optional noecho)
   "Move cursor to next instance of Mayan TZOLKIN-DATE. 
@@ -291,20 +291,6 @@
                           tzolkin-name-list 1 'capitalize)))))
     (cons tzolkin-count tzolkin-name)))
 
-(defun calendar-next-tzolkin-date (tzolkin-date &optional noecho)
-  "Move cursor to next instance of Mayan TZOLKIN-DATE.
-Echo Mayan date if NOECHO is t."
-  (interactive (list (calendar-read-mayan-tzolkin-date)))
-  (let* ((date (calendar-absolute-from-gregorian (calendar-cursor-to-date)))
-         (tomorrow-tzolkin-date
-          (calendar-mayan-tzolkin-from-absolute (1+ date))))
-    (calendar-goto-date
-     (calendar-gregorian-from-absolute
-      (+ date 1
-         (calendar-mayan-tzolkin-difference
-          tomorrow-tzolkin-date tzolkin-date)))))
-  (or noecho (calendar-print-mayan-date)))
-
 (defun calendar-next-calendar-round-date
   (tzolkin-date haab-date &optional noecho)
   "Move cursor to next instance of Mayan HAAB-DATE TZOKLIN-DATE combination.