[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-mayan.el
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calendar/cal-mayan.el |
Date: |
Fri, 04 Apr 2003 01:21:47 -0500 |
Index: emacs/lisp/calendar/cal-mayan.el
diff -c emacs/lisp/calendar/cal-mayan.el:1.19
emacs/lisp/calendar/cal-mayan.el:1.20
*** emacs/lisp/calendar/cal-mayan.el:1.19 Mon Jul 16 03:46:48 2001
--- emacs/lisp/calendar/cal-mayan.el Tue Feb 4 07:49:33 2003
***************
*** 137,143 ****
365)))
(defun calendar-next-haab-date (haab-date &optional noecho)
! "Move cursor to next instance of Mayan HAAB-DATE.
Echo Mayan date if NOECHO is t."
(interactive (list (calendar-read-mayan-haab-date)))
(calendar-goto-date
--- 137,143 ----
365)))
(defun calendar-next-haab-date (haab-date &optional noecho)
! "Move cursor to next instance of Mayan HAAB-DATE.
Echo Mayan date if NOECHO is t."
(interactive (list (calendar-read-mayan-haab-date)))
(calendar-goto-date
***************
*** 149,155 ****
(or noecho (calendar-print-mayan-date)))
(defun calendar-previous-haab-date (haab-date &optional noecho)
! "Move cursor to previous instance of Mayan HAAB-DATE.
Echo Mayan date if NOECHO is t."
(interactive (list (calendar-read-mayan-haab-date)))
(calendar-goto-date
--- 149,155 ----
(or noecho (calendar-print-mayan-date)))
(defun calendar-previous-haab-date (haab-date &optional noecho)
! "Move cursor to previous instance of Mayan HAAB-DATE.
Echo Mayan date if NOECHO is t."
(interactive (list (calendar-read-mayan-haab-date)))
(calendar-goto-date
***************
*** 199,205 ****
260)))
(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)))
(calendar-goto-date
--- 199,205 ----
260)))
(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)))
(calendar-goto-date
***************
*** 211,217 ****
(or noecho (calendar-print-mayan-date)))
(defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho)
! "Move cursor to previous instance of Mayan TZOLKIN-DATE.
Echo Mayan date if NOECHO is t."
(interactive (list (calendar-read-mayan-tzolkin-date)))
(calendar-goto-date
--- 211,217 ----
(or noecho (calendar-print-mayan-date)))
(defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho)
! "Move cursor to previous instance of Mayan TZOLKIN-DATE.
Echo Mayan date if NOECHO is t."
(interactive (list (calendar-read-mayan-tzolkin-date)))
(calendar-goto-date
***************
*** 230,236 ****
(defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date)
"Absolute date that is Mayan TZOLKIN-DATE and HAAB-DATE.
Latest such date on or before DATE.
! Returns nil if such a tzolkin-haab combination is impossible."
(let* ((haab-difference
(calendar-mayan-haab-difference
(calendar-mayan-haab-from-absolute 0)
--- 230,236 ----
(defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date)
"Absolute date that is Mayan TZOLKIN-DATE and HAAB-DATE.
Latest such date on or before DATE.
! Returns nil if such a tzolkin-haab combination is impossible."
(let* ((haab-difference
(calendar-mayan-haab-difference
(calendar-mayan-haab-from-absolute 0)
***************
*** 253,259 ****
(haab-day (calendar-read
"Haab kin (0-19): "
'(lambda (x) (and (>= x 0) (< x 20)))))
! (haab-month-list (append calendar-mayan-haab-month-name-array
(and (< haab-day 5) '("Uayeb"))))
(haab-month (cdr
(assoc-ignore-case
--- 253,259 ----
(haab-day (calendar-read
"Haab kin (0-19): "
'(lambda (x) (and (>= x 0) (< x 20)))))
! (haab-month-list (append calendar-mayan-haab-month-name-array
(and (< haab-day 5) '("Uayeb"))))
(haab-month (cdr
(assoc-ignore-case
***************
*** 272,278 ****
(tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil))
(tzolkin-name (cdr
(assoc-ignore-case
! (completing-read "Tzolkin uinal: "
(mapcar 'list tzolkin-name-list)
nil t)
(calendar-make-alist tzolkin-name-list 1)))))
--- 272,278 ----
(tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil))
(tzolkin-name (cdr
(assoc-ignore-case
! (completing-read "Tzolkin uinal: "
(mapcar 'list tzolkin-name-list)
nil t)
(calendar-make-alist tzolkin-name-list 1)))))
***************
*** 326,332 ****
(defun calendar-mayan-date-string (&optional date)
"String of Mayan date of Gregorian DATE.
Defaults to today's date if DATE is not given."
! (let* ((d (calendar-absolute-from-gregorian
(or date (calendar-current-date))))
(tzolkin (calendar-mayan-tzolkin-from-absolute d))
(haab (calendar-mayan-haab-from-absolute d))
--- 326,332 ----
(defun calendar-mayan-date-string (&optional date)
"String of Mayan date of Gregorian DATE.
Defaults to today's date if DATE is not given."
! (let* ((d (calendar-absolute-from-gregorian
(or date (calendar-current-date))))
(tzolkin (calendar-mayan-tzolkin-from-absolute d))
(haab (calendar-mayan-haab-from-absolute d))
***************
*** 348,354 ****
(let (lc)
(while (not lc)
(let ((datum
! (calendar-string-to-mayan-long-count
(read-string "Mayan long count (baktun.katun.tun.uinal.kin): "
(calendar-mayan-long-count-to-string
(calendar-mayan-long-count-from-absolute
--- 348,354 ----
(let (lc)
(while (not lc)
(let ((datum
! (calendar-string-to-mayan-long-count
(read-string "Mayan long count (baktun.katun.tun.uinal.kin): "
(calendar-mayan-long-count-to-string
(calendar-mayan-long-count-from-absolute
***************
*** 361,367 ****
(calendar-gregorian-from-absolute
(calendar-absolute-from-mayan-long-count date)))
(or noecho (calendar-print-mayan-date)))
!
(defun calendar-mayan-long-count-common-era (lc)
"T if long count represents date in the Common Era."
(let ((base (calendar-mayan-long-count-from-absolute 1)))
--- 361,367 ----
(calendar-gregorian-from-absolute
(calendar-absolute-from-mayan-long-count date)))
(or noecho (calendar-print-mayan-date)))
!
(defun calendar-mayan-long-count-common-era (lc)
"T if long count represents date in the Common Era."
(let ((base (calendar-mayan-long-count-from-absolute 1)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/calendar/cal-mayan.el,
Miles Bader <=