diff options
| author | Jim Blandy | 1993-06-22 03:23:59 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-06-22 03:23:59 +0000 |
| commit | c6b6c929dc06dcbffb132af0c7c75aee92691e67 (patch) | |
| tree | 59e11ce05157755b557a14ee633720367ca64aaa | |
| parent | 44e9df9abc6489ef9d3eaf2e3ee0dc37da86571a (diff) | |
| download | emacs-c6b6c929dc06dcbffb132af0c7c75aee92691e67.tar.gz emacs-c6b6c929dc06dcbffb132af0c7c75aee92691e67.zip | |
* cal-mayan.el (calendar-mayan-days-before-absolute-zero,
calendar-mayan-haab-difference, calendar-mayan-tzolkin-difference,
calendar-mayan-tzolkin-haab-on-or-before,
calendar-previous-calendar-round-date,
calendar-absolute-from-mayan-long-count,
calendar-print-mayan-date): Fix doc strings.
| -rw-r--r-- | lisp/calendar/cal-mayan.el | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index 9d88e4e60fa..f36b8224d2c 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el | |||
| @@ -65,11 +65,10 @@ | |||
| 65 | (1+ (mayan-mod (1- m) n))) | 65 | (1+ (mayan-mod (1- m) n))) |
| 66 | 66 | ||
| 67 | (defconst calendar-mayan-days-before-absolute-zero 1137140 | 67 | (defconst calendar-mayan-days-before-absolute-zero 1137140 |
| 68 | "Number of days of the Mayan calendar epoch before absolute day 0 (that is, | 68 | "Number of days of the Mayan calendar epoch before absolute day 0. |
| 69 | Dec 31, 0 (Gregorian)), according to the Goodman-Martinez-Thompson | 69 | According to the Goodman-Martinez-Thompson correlation. This correlation is |
| 70 | correlation. This correlation is not universally accepted, as it still a | 70 | not universally accepted, as it still a subject of astro-archeological |
| 71 | subject of astro-archeological research. Using 1232041 will give you the | 71 | research. Using 1232041 will give you the correlation used by Spinden.") |
| 72 | correlation used by Spinden.") | ||
| 73 | 72 | ||
| 74 | (defconst calendar-mayan-haab-at-epoch '(8 . 18) | 73 | (defconst calendar-mayan-haab-at-epoch '(8 . 18) |
| 75 | "Mayan haab date at the epoch.") | 74 | "Mayan haab date at the epoch.") |
| @@ -132,8 +131,7 @@ correlation used by Spinden.") | |||
| 132 | (cons day month))) | 131 | (cons day month))) |
| 133 | 132 | ||
| 134 | (defun calendar-mayan-haab-difference (date1 date2) | 133 | (defun calendar-mayan-haab-difference (date1 date2) |
| 135 | "Number of days from Mayan haab date DATE1 to the next occurrence of Mayan | 134 | "Number of days from Mayan haab DATE1 to next occurrence of haab date DATE2." |
| 136 | haab date DATE2." | ||
| 137 | (mayan-mod (+ (* 20 (- (cdr date2) (cdr date1))) | 135 | (mayan-mod (+ (* 20 (- (cdr date2) (cdr date1))) |
| 138 | (- (car date2) (car date1))) | 136 | (- (car date2) (car date1))) |
| 139 | 365)) | 137 | 365)) |
| @@ -192,8 +190,7 @@ Echo Mayan date if NOECHO is t." | |||
| 192 | (cons day name))) | 190 | (cons day name))) |
| 193 | 191 | ||
| 194 | (defun calendar-mayan-tzolkin-difference (date1 date2) | 192 | (defun calendar-mayan-tzolkin-difference (date1 date2) |
| 195 | "Number of days from Mayan tzolkin date DATE1 to the next occurrence of | 193 | "Number of days from Mayan tzolkin DATE1 to next occurrence of tzolkin DATE2." |
| 196 | Mayan tzolkin date DATE2." | ||
| 197 | (let ((number-difference (- (car date2) (car date1))) | 194 | (let ((number-difference (- (car date2) (car date1))) |
| 198 | (name-difference (- (cdr date2) (cdr date1)))) | 195 | (name-difference (- (cdr date2) (cdr date1)))) |
| 199 | (mayan-mod (+ number-difference | 196 | (mayan-mod (+ number-difference |
| @@ -239,8 +236,9 @@ Echo Mayan date if NOECHO is t." | |||
| 239 | (aref calendar-mayan-tzolkin-names-array (1- (cdr tzolkin))))) | 236 | (aref calendar-mayan-tzolkin-names-array (1- (cdr tzolkin))))) |
| 240 | 237 | ||
| 241 | (defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date) | 238 | (defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date) |
| 242 | "Absolute date of latest date on or before date that is Mayan TZOLKIN-DATE | 239 | "Absolute date that is Mayan TZOLKIN-DATE and HAAB-DATE. |
| 243 | and HAAB-DATE; returns nil if such a tzolkin-haab combination is impossible." | 240 | Latest such date on or before DATE. |
| 241 | Returns nil if such a tzolkin-haab combination is impossible." | ||
| 244 | (let* ((haab-difference | 242 | (let* ((haab-difference |
| 245 | (calendar-mayan-haab-difference | 243 | (calendar-mayan-haab-difference |
| 246 | (calendar-mayan-haab-from-absolute 0) | 244 | (calendar-mayan-haab-from-absolute 0) |
| @@ -311,8 +309,8 @@ Echo Mayan date if NOECHO is t." | |||
| 311 | 309 | ||
| 312 | (defun calendar-previous-calendar-round-date | 310 | (defun calendar-previous-calendar-round-date |
| 313 | (tzolkin-date haab-date &optional noecho) | 311 | (tzolkin-date haab-date &optional noecho) |
| 314 | "Move cursor to previous instance of Mayan TZOKLIN-DATE HAAB-DATE | 312 | "Move to previous instance of Mayan TZOKLIN-DATE HAAB-DATE combination. |
| 315 | combination. Echo Mayan date if NOECHO is t." | 313 | Echo Mayan date if NOECHO is t." |
| 316 | (interactive (list (calendar-read-mayan-tzolkin-date) | 314 | (interactive (list (calendar-read-mayan-tzolkin-date) |
| 317 | (calendar-read-mayan-haab-date))) | 315 | (calendar-read-mayan-haab-date))) |
| 318 | (let ((date (calendar-mayan-tzolkin-haab-on-or-before | 316 | (let ((date (calendar-mayan-tzolkin-haab-on-or-before |
| @@ -327,8 +325,8 @@ combination. Echo Mayan date if NOECHO is t." | |||
| 327 | (or noecho (calendar-print-mayan-date))))) | 325 | (or noecho (calendar-print-mayan-date))))) |
| 328 | 326 | ||
| 329 | (defun calendar-absolute-from-mayan-long-count (c) | 327 | (defun calendar-absolute-from-mayan-long-count (c) |
| 330 | "Compute the absolute date corresponding to the Mayan Long | 328 | "Compute the absolute date corresponding to the Mayan Long Count C. |
| 331 | Count $c$, which is a list (baktun katun tun uinal kin)" | 329 | Long count is a list (baktun katun tun uinal kin)" |
| 332 | (+ (* (nth 0 c) 144000) ; baktun | 330 | (+ (* (nth 0 c) 144000) ; baktun |
| 333 | (* (nth 1 c) 7200) ; katun | 331 | (* (nth 1 c) 7200) ; katun |
| 334 | (* (nth 2 c) 360) ; tun | 332 | (* (nth 2 c) 360) ; tun |
| @@ -338,8 +336,7 @@ Count $c$, which is a list (baktun katun tun uinal kin)" | |||
| 338 | calendar-mayan-days-before-absolute-zero))) | 336 | calendar-mayan-days-before-absolute-zero))) |
| 339 | 337 | ||
| 340 | (defun calendar-print-mayan-date () | 338 | (defun calendar-print-mayan-date () |
| 341 | "Show the Mayan long count, tzolkin, and haab equivalents of the date | 339 | "Show the Mayan long count, tzolkin, and haab equivalents of date." |
| 342 | under the cursor." | ||
| 343 | (interactive) | 340 | (interactive) |
| 344 | (let* ((d (calendar-absolute-from-gregorian | 341 | (let* ((d (calendar-absolute-from-gregorian |
| 345 | (or (calendar-cursor-to-date) | 342 | (or (calendar-cursor-to-date) |