"Convert MAYAN-LONG-COUNT into traditional written form."
(apply 'format (cons "%s.%s.%s.%s.%s" mayan-long-count)))
-(defun calendar-string-to-mayan-long-count (str)
+(defun calendar-mayan-string-from-long-count (str)
"Given STR, a string of format \"%d.%d.%d.%d.%d\", return list of numbers."
(let ((end 0)
rlc)
(calendar-mayan-haab-to-string haab))))
;;;###cal-autoload
-(defun calendar-print-mayan-date ()
+(defun calendar-mayan-print-date ()
"Show the Mayan long count, tzolkin, and haab equivalents of date."
(interactive)
(message "Mayan date: %s"
(calendar-mayan-date-string (calendar-cursor-to-date t))))
-(defun calendar-read-mayan-haab-date ()
+(define-obsolete-function-alias 'calendar-print-mayan-date
+ 'calendar-mayan-print-date "23.1")
+
+(defun calendar-mayan-read-haab-date ()
"Prompt for a Mayan haab date."
(let* ((completion-ignore-case t)
(haab-day (calendar-read
(calendar-make-alist haab-month-list 1) t))))
(cons haab-day haab-month)))
-(defun calendar-read-mayan-tzolkin-date ()
+(defun calendar-mayan-read-tzolkin-date ()
"Prompt for a Mayan tzolkin date."
(let* ((completion-ignore-case t)
(tzolkin-count (calendar-read
(cons tzolkin-count tzolkin-name)))
;;;###cal-autoload
-(defun calendar-next-haab-date (haab-date &optional noecho)
+(defun calendar-mayan-next-haab-date (haab-date &optional noecho)
"Move cursor to next instance of Mayan HAAB-DATE.
Echo Mayan date unless NOECHO is non-nil."
- (interactive (list (calendar-read-mayan-haab-date)))
+ (interactive (list (calendar-mayan-read-haab-date)))
(calendar-goto-date
(calendar-gregorian-from-absolute
(calendar-mayan-haab-on-or-before
haab-date
(+ 365
(calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
- (or noecho (calendar-print-mayan-date)))
+ (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-next-haab-date
+ 'calendar-mayan-next-haab-date "23.1")
;;;###cal-autoload
-(defun calendar-previous-haab-date (haab-date &optional noecho)
+(defun calendar-mayan-previous-haab-date (haab-date &optional noecho)
"Move cursor to previous instance of Mayan HAAB-DATE.
Echo Mayan date unless NOECHO is non-nil."
- (interactive (list (calendar-read-mayan-haab-date)))
+ (interactive (list (calendar-mayan-read-haab-date)))
(calendar-goto-date
(calendar-gregorian-from-absolute
(calendar-mayan-haab-on-or-before
haab-date
(1- (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
- (or noecho (calendar-print-mayan-date)))
+ (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-previous-haab-date
+ 'calendar-mayan-previous-haab-date "23.1")
(defun calendar-mayan-haab-to-string (haab)
"Convert Mayan HAAB date (a pair) into its traditional written form."
260)))
;;;###cal-autoload
-(defun calendar-next-tzolkin-date (tzolkin-date &optional noecho)
+(defun calendar-mayan-next-tzolkin-date (tzolkin-date &optional noecho)
"Move cursor to next instance of Mayan TZOLKIN-DATE.
Echo Mayan date unless NOECHO is non-nil."
- (interactive (list (calendar-read-mayan-tzolkin-date)))
+ (interactive (list (calendar-mayan-read-tzolkin-date)))
(calendar-goto-date
(calendar-gregorian-from-absolute
(calendar-mayan-tzolkin-on-or-before
tzolkin-date
(+ 260
(calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
- (or noecho (calendar-print-mayan-date)))
+ (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-next-tzolkin-date
+ 'calendar-mayan-next-tzolkin-date "23.1")
;;;###cal-autoload
-(defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho)
+(defun calendar-mayan-previous-tzolkin-date (tzolkin-date &optional noecho)
"Move cursor to previous instance of Mayan TZOLKIN-DATE.
Echo Mayan date unless NOECHO is non-nil."
- (interactive (list (calendar-read-mayan-tzolkin-date)))
+ (interactive (list (calendar-mayan-read-tzolkin-date)))
(calendar-goto-date
(calendar-gregorian-from-absolute
(calendar-mayan-tzolkin-on-or-before
tzolkin-date
(1- (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
- (or noecho (calendar-print-mayan-date)))
+ (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-previous-tzolkin-date
+ 'calendar-mayan-previous-tzolkin-date "23.1")
(defun calendar-mayan-tzolkin-to-string (tzolkin)
"Convert Mayan TZOLKIN date (a pair) into its traditional written form."
nil)))
;;;###cal-autoload
-(defun calendar-next-calendar-round-date (tzolkin-date haab-date
+(defun calendar-mayan-next-round-date (tzolkin-date haab-date
&optional noecho)
"Move cursor to next instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
Echo Mayan date unless NOECHO is non-nil."
- (interactive (list (calendar-read-mayan-tzolkin-date)
- (calendar-read-mayan-haab-date)))
+ (interactive (list (calendar-mayan-read-tzolkin-date)
+ (calendar-mayan-read-haab-date)))
(let ((date (calendar-mayan-tzolkin-haab-on-or-before
tzolkin-date haab-date
(+ 18980 (calendar-absolute-from-gregorian
(calendar-mayan-tzolkin-to-string tzolkin-date)
(calendar-mayan-haab-to-string haab-date))
(calendar-goto-date (calendar-gregorian-from-absolute date))
- (or noecho (calendar-print-mayan-date)))))
+ (or noecho (calendar-mayan-print-date)))))
+
+(define-obsolete-function-alias 'calendar-next-calendar-round-date
+ 'calendar-mayan-next-round-date "23.1")
;;;###cal-autoload
-(defun calendar-previous-calendar-round-date
+(defun calendar-mayan-previous-round-date
(tzolkin-date haab-date &optional noecho)
"Move to previous instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
Echo Mayan date unless NOECHO is non-nil."
- (interactive (list (calendar-read-mayan-tzolkin-date)
- (calendar-read-mayan-haab-date)))
+ (interactive (list (calendar-mayan-read-tzolkin-date)
+ (calendar-mayan-read-haab-date)))
(let ((date (calendar-mayan-tzolkin-haab-on-or-before
tzolkin-date haab-date
(1- (calendar-absolute-from-gregorian
(calendar-mayan-tzolkin-to-string tzolkin-date)
(calendar-mayan-haab-to-string haab-date))
(calendar-goto-date (calendar-gregorian-from-absolute date))
- (or noecho (calendar-print-mayan-date)))))
+ (or noecho (calendar-mayan-print-date)))))
-(defun calendar-absolute-from-mayan-long-count (c)
+(define-obsolete-function-alias 'calendar-previous-calendar-round-date
+ 'calendar-mayan-previous-round-date "23.1")
+
+(defun calendar-mayan-long-count-to-absolute (c)
"Compute the absolute date corresponding to the Mayan Long Count C.
Long count is a list (baktun katun tun uinal kin)"
(+ (* (nth 0 c) 144000) ; baktun
(or (null lc) (> (car lc) (car base)))))
;;;###cal-autoload
-(defun calendar-goto-mayan-long-count-date (date &optional noecho)
+(defun calendar-mayan-goto-long-count-date (date &optional noecho)
"Move cursor to Mayan long count DATE.
Echo Mayan date unless NOECHO is non-nil."
(interactive
(let (datum)
(while (not (setq datum
- (calendar-string-to-mayan-long-count
+ (calendar-mayan-string-from-long-count
(read-string
"Mayan long count (baktun.katun.tun.uinal.kin): "
(calendar-mayan-long-count-to-string
datum))
(calendar-goto-date
(calendar-gregorian-from-absolute
- (calendar-absolute-from-mayan-long-count date)))
- (or noecho (calendar-print-mayan-date)))
+ (calendar-mayan-long-count-to-absolute date)))
+ (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-goto-mayan-long-count-date
+ 'calendar-mayan-goto-long-count-date "23.1")
(defvar date)