Current File : //proc/self/root/kunden/usr/share/emacs/27.2/lisp/calendar/cal-mayan.elc |
;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.
;;; This file uses dynamic docstrings, first added in Emacs 19.29.
;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'calendar)
#@266 Number of days of the Mayan calendar epoch before absolute day 0.
This is the Goodman-Martinez-Thompson correlation used by almost all experts,
but some use 1137140. Using 1232041 gives you Spinden's correlation; using
1142840 gives you Hochleitner's correlation.
(defconst calendar-mayan-days-before-absolute-zero 1137142 (#$ . 429))
#@31 Mayan haab date at the epoch.
(defconst calendar-mayan-haab-at-epoch '(8 . 18) (#$ . 771))
#@33 Names of the Mayan haab months.
(defconst calendar-mayan-haab-month-name-array ["Pop" "Uo" "Zip" "Zotz" "Tzec" "Xul" "Yaxkin" "Mol" "Chen" "Yax" "Zac" "Ceh" "Mac" "Kankin" "Muan" "Pax" "Kayab" "Cumku"] (#$ . 868))
#@34 Mayan tzolkin date at the epoch.
(defconst calendar-mayan-tzolkin-at-epoch '(4 . 20) (#$ . 1088))
#@36 Names of the Mayan tzolkin months.
(defconst calendar-mayan-tzolkin-names-array ["Imix" "Ik" "Akbal" "Kan" "Chicchan" "Cimi" "Manik" "Lamat" "Muluc" "Oc" "Chuen" "Eb" "Ben" "Ix" "Men" "Cib" "Caban" "Etznab" "Cauac" "Ahau"] (#$ . 1192))
#@66 Compute the Mayan long count corresponding to the absolute DATE.
(defalias 'calendar-mayan-long-count-from-absolute #[(date) " \\\211\306\245\n\306\246\211\307\245\f\307\246\211\310\245\n\f\310\246\211\311\245\f\311\246\f
\n\f\257. \207" [date calendar-mayan-days-before-absolute-zero long-count baktun remainder katun 144000 7200 360 20 tun uinal kin] 6 (#$ . 1434)])
#@57 Convert MAYAN-LONG-COUNT into traditional written form.
(defalias 'calendar-mayan-long-count-to-string #[(mayan-long-count) "\301\302\303B\"\207" [mayan-long-count apply format "%s.%s.%s.%s.%s"] 4 (#$ . 1826)])
#@73 Given STR, a string of format "%d.%d.%d.%d.%d", return list of numbers.
(defalias 'calendar-mayan-string-from-long-count #[(str) "\303\304\3051/ \306\307\n #\203 \310\311\303\n\"!B\303\225\202 G\312U?\205+ \313\314\304\"0\2023 \210\2024 \210\237*\207" [rlc end str 0 nil (invalid-read-syntax) string-match "[0-9]+" string-to-number match-string 5 signal invalid-read-syntax] 4 (#$ . 2044)])
#@56 Convert absolute DATE into a Mayan haab date (a pair).
(defalias 'calendar-mayan-haab-from-absolute #[(date) " \\\306\n@\307AS_#\310\246\211\307\246\f\307\245T
,B\207" [date calendar-mayan-days-before-absolute-zero long-count calendar-mayan-haab-at-epoch day-of-haab day + 20 365 month] 6 (#$ . 2450)])
#@77 Number of days from Mayan haab DATE1 to next occurrence of haab date DATE2.
(defalias 'calendar-mayan-haab-difference #[(date1 date2) "\302\303A AZ_@ @Z\\\304\"\207" [date2 date1 mod 20 365] 4 (#$ . 2769)])
#@63 Absolute date of latest HAAB-DATE on or before absolute DATE.
(defalias 'calendar-mayan-haab-on-or-before #[(haab-date date) "\211\302\303\304! \"Z\305\246Z\207" [date haab-date calendar-mayan-haab-difference calendar-mayan-haab-from-absolute 0 365] 5 (#$ . 2984)])
#@56 String of Mayan date of Gregorian DATE; default today.
(defalias 'calendar-mayan-date-string #[(&optional date) "\206 \305 \211\3068\262\307\310U\203 \311\312!\202Y\310V\203\217 S\262\313\211\211@\262\211A@\262\3068\262\314S_\\\306V\203z \211\315\316_\\\317\245Z\262\211\310W\203[ \320!S\262\211\316\246\310U\205q \211\321\246\310U?\206q \211\322\246\310U\262\203z \211T\262\266\203\262\323_\316\245\321\245[\322\245%\202Y\320T!\262\324\211\211@\262\211A@\262\3068\262\314S_\\\306V\203\354 \211\315\316_\\\317\245Z\262\211\310W\203\315 \320!S\262\211\316\246\310U\205\343 \211\321\246\310U?\206\343 \211\322\246\310U\262\203\354 \211T\262\266\203\262\323_\316\245\321\245[\322\245\325\211\211@\262\211A@\262\3068\262\314S_\\\306V\203S\211\315\316_\\\317\245Z\262\211\310W\2034\320!S\262\211\316\246\310U\205J\211\321\246\310U?\206J\211\322\246\310U\262\203S\211T\262\266\203\262&\266\203\326 !\327 !\330 !\331\332\333\f!\334\n!\335!$,\207" [date d tzolkin haab long-count calendar-current-date 2 nil 0 user-error "There was no year zero" + 31 23 4 10 abs 100 400 365 - (12 31 -1) calendar-mayan-tzolkin-from-absolute calendar-mayan-haab-from-absolute calendar-mayan-long-count-from-absolute format "Long count = %s; tzolkin = %s; haab = %s" calendar-mayan-long-count-to-string calendar-mayan-tzolkin-to-string calendar-mayan-haab-to-string] 18 (#$ . 3257)])
#@67 Show the Mayan long count, tzolkin, and haab equivalents of date.
(defalias 'calendar-mayan-print-date #[nil "\300\301\302\303\304!!\"\207" [message "Mayan date: %s" calendar-mayan-date-string calendar-cursor-to-date t] 5 (#$ . 4709) nil])
#@31 Prompt for a Mayan haab date.
(defalias 'calendar-mayan-read-haab-date #[nil "\305\306\307\310\"\311\n \312W\205 \313\"\314\315\316\317\320\"\321\305$\322\323\"\305#A \f,B\207" [completion-ignore-case haab-day calendar-mayan-haab-month-name-array haab-month-list haab-month t calendar-read "Haab kin (0-19): " #[(x) "\301Y\205 \302W\207" [x 0 20] 2] append 5 ("Uayeb") assoc-string completing-read "Haab uinal: " mapcar list nil calendar-make-alist 1] 6 (#$ . 4955)])
#@34 Prompt for a Mayan tzolkin date.
(defalias 'calendar-mayan-read-tzolkin-date #[nil "\305\306\307\310\"\311\n\312\"\313\314\315\316\317\"\312\305$\320\321\"\305#A \f,B\207" [completion-ignore-case tzolkin-count calendar-mayan-tzolkin-names-array tzolkin-name-list tzolkin-name t calendar-read "Tzolkin kin (1-13): " #[(x) "\301V\205 \302W\207" [x 0 14] 2] append nil assoc-string completing-read "Tzolkin uinal: " mapcar list calendar-make-alist 1] 6 (#$ . 5439)])
#@92 Move cursor to next instance of Mayan HAAB-DATE.
Echo Mayan date unless NOECHO is non-nil.
(defalias 'calendar-mayan-next-haab-date #[(haab-date &optional noecho) "\302\303\304\305\306 \211\3078\262\310\311U\203 \312\313!\202Z\311V\203\220 S\262\314\211\211@\262\211A@\262\3078\262\315S_\\\307V\203{ \211\316\317_\\\320\245Z\262\211\311W\203\\ \321!S\262\211\317\246\311U\205r \211\322\246\311U?\206r \211\323\246\311U\262\203{ \211T\262\266\203\262\305_\317\245\322\245[\323\245%\202Z\321T!\262\324\211\211@\262\211A@\262\3078\262\315S_\\\307V\203\355 \211\316\317_\\\320\245Z\262\211\311W\203\316 \321!S\262\211\317\246\311U\205\344 \211\322\246\311U?\206\344 \211\323\246\311U\262\203\355 \211T\262\266\203\262\305_\317\245\322\245[\323\245\325\211\211@\262\211A@\262\3078\262\315S_\\\307V\203T\211\316\317_\\\320\245Z\262\211\311W\2035\321!S\262\211\317\246\311U\205K\211\322\246\311U?\206K\211\323\246\311U\262\203T\211T\262\266\203\262&\266\203\\\"!!\210 \206g\326 \207" [haab-date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-mayan-haab-on-or-before 365 calendar-cursor-to-date 2 nil 0 user-error "There was no year zero" + 31 23 4 10 abs 100 400 - (12 31 -1) calendar-mayan-print-date] 23 (#$ . 5918) (list (calendar-mayan-read-haab-date))])
#@96 Move cursor to previous instance of Mayan HAAB-DATE.
Echo Mayan date unless NOECHO is non-nil.
(defalias 'calendar-mayan-previous-haab-date #[(haab-date &optional noecho) "\302\303\304\305 \211\3068\262\307\310U\203 \311\312!\202Y\310V\203\217 S\262\313\211\211@\262\211A@\262\3068\262\314S_\\\306V\203z \211\315\316_\\\317\245Z\262\211\310W\203[ \320!S\262\211\316\246\310U\205q \211\321\246\310U?\206q \211\322\246\310U\262\203z \211T\262\266\203\262\323_\316\245\321\245[\322\245%\202Y\320T!\262\324\211\211@\262\211A@\262\3068\262\314S_\\\306V\203\354 \211\315\316_\\\317\245Z\262\211\310W\203\315 \320!S\262\211\316\246\310U\205\343 \211\321\246\310U?\206\343 \211\322\246\310U\262\203\354 \211T\262\266\203\262\323_\316\245\321\245[\322\245\325\211\211@\262\211A@\262\3068\262\314S_\\\306V\203S\211\315\316_\\\317\245Z\262\211\310W\2034\320!S\262\211\316\246\310U\205J\211\321\246\310U?\206J\211\322\246\310U\262\203S\211T\262\266\203\262&\266\203S\"!!\210 \206f\326 \207" [haab-date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-mayan-haab-on-or-before calendar-cursor-to-date 2 nil 0 user-error "There was no year zero" + 31 23 4 10 abs 100 400 365 - (12 31 -1) calendar-mayan-print-date] 22 (#$ . 7280) (list (calendar-mayan-read-haab-date))])
#@69 Convert Mayan HAAB date (a pair) into its traditional written form.
(defalias 'calendar-mayan-haab-to-string #[(haab) "A\303\304@ \305U\203 \306\202 \n SH#)\207" [haab month calendar-mayan-haab-month-name-array format "%d %s" 19 "Uayeb"] 5 (#$ . 8644)])
#@59 Convert absolute DATE into a Mayan tzolkin date (a pair).
(defalias 'calendar-mayan-tzolkin-from-absolute #[(date) " \\\306\n@\\S\307\"T\306\nA\\S\310\"T\f
+B\207" [date calendar-mayan-days-before-absolute-zero long-count calendar-mayan-tzolkin-at-epoch day name mod 13 20] 3 (#$ . 8909)])
#@78 Number of days from Mayan tzolkin DATE1 to next occurrence of tzolkin DATE2.
(defalias 'calendar-mayan-tzolkin-difference #[(date1 date2) "@ @ZA AZ\304\305\304\306\nZ_\307\"_\\\310\"*\207" [date2 date1 name-difference number-difference mod 13 3 20 260] 7 (#$ . 9211)])
#@66 Absolute date of latest TZOLKIN-DATE on or before absolute DATE.
(defalias 'calendar-mayan-tzolkin-on-or-before #[(tzolkin-date date) "\211\302\303\304! \"Z\305\246Z\207" [date tzolkin-date calendar-mayan-tzolkin-difference calendar-mayan-tzolkin-from-absolute 0 260] 5 (#$ . 9492)])
#@95 Move cursor to next instance of Mayan TZOLKIN-DATE.
Echo Mayan date unless NOECHO is non-nil.
(defalias 'calendar-mayan-next-tzolkin-date #[(tzolkin-date &optional noecho) "\302\303\304\305\306 \211\3078\262\310\311U\203 \312\313!\202Z\311V\203\220 S\262\314\211\211@\262\211A@\262\3078\262\315S_\\\307V\203{ \211\316\317_\\\320\245Z\262\211\311W\203\\ \321!S\262\211\317\246\311U\205r \211\322\246\311U?\206r \211\323\246\311U\262\203{ \211T\262\266\203\262\324_\317\245\322\245[\323\245%\202Z\321T!\262\325\211\211@\262\211A@\262\3078\262\315S_\\\307V\203\355 \211\316\317_\\\320\245Z\262\211\311W\203\316 \321!S\262\211\317\246\311U\205\344 \211\322\246\311U?\206\344 \211\323\246\311U\262\203\355 \211T\262\266\203\262\324_\317\245\322\245[\323\245\326\211\211@\262\211A@\262\3078\262\315S_\\\307V\203T\211\316\317_\\\320\245Z\262\211\311W\2035\321!S\262\211\317\246\311U\205K\211\322\246\311U?\206K\211\323\246\311U\262\203T\211T\262\266\203\262&\266\203\\\"!!\210 \206g\327 \207" [tzolkin-date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-mayan-tzolkin-on-or-before 260 calendar-cursor-to-date 2 nil 0 user-error "There was no year zero" + 31 23 4 10 abs 100 400 365 - (12 31 -1) calendar-mayan-print-date] 23 (#$ . 9783) (list (calendar-mayan-read-tzolkin-date))])
#@99 Move cursor to previous instance of Mayan TZOLKIN-DATE.
Echo Mayan date unless NOECHO is non-nil.
(defalias 'calendar-mayan-previous-tzolkin-date #[(tzolkin-date &optional noecho) "\302\303\304\305 \211\3068\262\307\310U\203 \311\312!\202Y\310V\203\217 S\262\313\211\211@\262\211A@\262\3068\262\314S_\\\306V\203z \211\315\316_\\\317\245Z\262\211\310W\203[ \320!S\262\211\316\246\310U\205q \211\321\246\310U?\206q \211\322\246\310U\262\203z \211T\262\266\203\262\323_\316\245\321\245[\322\245%\202Y\320T!\262\324\211\211@\262\211A@\262\3068\262\314S_\\\306V\203\354 \211\315\316_\\\317\245Z\262\211\310W\203\315 \320!S\262\211\316\246\310U\205\343 \211\321\246\310U?\206\343 \211\322\246\310U\262\203\354 \211T\262\266\203\262\323_\316\245\321\245[\322\245\325\211\211@\262\211A@\262\3068\262\314S_\\\306V\203S\211\315\316_\\\317\245Z\262\211\310W\2034\320!S\262\211\316\246\310U\205J\211\321\246\310U?\206J\211\322\246\310U\262\203S\211T\262\266\203\262&\266\203S\"!!\210 \206f\326 \207" [tzolkin-date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-mayan-tzolkin-on-or-before calendar-cursor-to-date 2 nil 0 user-error "There was no year zero" + 31 23 4 10 abs 100 400 365 - (12 31 -1) calendar-mayan-print-date] 22 (#$ . 11167) (list (calendar-mayan-read-tzolkin-date))])
#@72 Convert Mayan TZOLKIN date (a pair) into its traditional written form.
(defalias 'calendar-mayan-tzolkin-to-string #[(tzolkin) "\302\303@ ASH#\207" [tzolkin calendar-mayan-tzolkin-names-array format "%d %s"] 5 (#$ . 12550)])
#@155 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.
(defalias 'calendar-mayan-tzolkin-haab-on-or-before #[(tzolkin-date haab-date date) "\306\307\310!\"\311\312\310!\n\"\211 Z\211\313\246\310U\205&