summaryrefslogtreecommitdiff
path: root/lisp/calendar/cal-mayan.el
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-03-11 07:03:17 +0000
committerJim Blandy <jimb@redhat.com>1993-03-11 07:03:17 +0000
commit63f76385380d82e75bfad51d049dc2f30249a751 (patch)
treec1b3b9c3c290703be769f02dd62a9ced7135c143 /lisp/calendar/cal-mayan.el
parenta055a1cd6e038214a1a9f3d0f3619b93865d9973 (diff)
downloademacs-63f76385380d82e75bfad51d049dc2f30249a751.tar.gz
* 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.
Diffstat (limited to 'lisp/calendar/cal-mayan.el')
-rw-r--r--lisp/calendar/cal-mayan.el34
1 files changed, 10 insertions, 24 deletions
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el
index c0eff55355c..0ee7c8613e4 100644
--- a/lisp/calendar/cal-mayan.el
+++ b/lisp/calendar/cal-mayan.el
@@ -139,11 +139,11 @@ haab date DATE2."
(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 @@ Mayan tzolkin date DATE2."
(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 @@ and HAAB-DATE; returns nil if such a tzolkin-haab combination is impossible."
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.