(calendar-mayan-haab-from-absolute 0) haab-date))
365)))
-;;;###autoload
+;;;###cal-autoload
(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."
(calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
(or noecho (calendar-print-mayan-date)))
-;;;###autoload
+;;;###cal-autoload
(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."
tzolkin-date))
260)))
-;;;###autoload
+;;;###cal-autoload
(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."
(calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
(or noecho (calendar-print-mayan-date)))
-;;;###autoload
+;;;###cal-autoload
(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."
(calendar-make-alist tzolkin-name-list 1) t))))
(cons tzolkin-count tzolkin-name)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-next-calendar-round-date (tzolkin-date haab-date
&optional noecho)
"Move cursor to next instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
(calendar-goto-date (calendar-gregorian-from-absolute date))
(or noecho (calendar-print-mayan-date)))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-previous-calendar-round-date
(tzolkin-date haab-date &optional noecho)
"Move to previous instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
(- ; days before absolute date 0
calendar-mayan-days-before-absolute-zero)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-mayan-date-string (&optional date)
"String of Mayan date of Gregorian DATE.
Defaults to today's date if DATE is not given."
(calendar-mayan-tzolkin-to-string tzolkin)
(calendar-mayan-haab-to-string haab))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-print-mayan-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))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-mayan-long-count-date (date &optional noecho)
"Move cursor to Mayan long count DATE. Echo Mayan date unless NOECHO is t."
(interactive
(defvar date)
;; To be called from list-sexp-diary-entries, where DATE is bound.
+;;;###diary-autoload
(defun diary-mayan-date ()
"Show the Mayan long count, haab, and tzolkin dates as a diary entry."
(format "Mayan date: %s" (calendar-mayan-date-string date)))
(provide 'cal-mayan)
-;; Local Variables:
-;; generated-autoload-file: "cal-loaddefs.el"
-;; End:
-
;; arch-tag: 54f35144-cd0f-4873-935a-a60129de07df
;;; cal-mayan.el ends here
(require 'calendar)
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-today ()
"Reposition the calendar window so the current date is visible."
(interactive)
(calendar-cursor-to-visible-date today)))
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-forward-month (arg)
"Move the cursor forward ARG months.
Movement is backward if ARG is negative."
(calendar-cursor-to-visible-date new-cursor-date)))
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-forward-year (arg)
"Move the cursor forward by ARG years.
Movement is backward if ARG is negative."
(interactive "p")
(calendar-forward-month (* 12 arg)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-backward-month (arg)
"Move the cursor backward by ARG months.
Movement is forward if ARG is negative."
(interactive "p")
(calendar-forward-month (- arg)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-backward-year (arg)
"Move the cursor backward ARG years.
Movement is forward is ARG is negative."
(interactive "p")
(calendar-forward-month (* -12 arg)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-scroll-left (&optional arg event)
"Scroll the displayed calendar left by ARG months.
If ARG is negative the calendar is scrolled right. Maintains the relative
(t (list month 1 year)))))))
(run-hooks 'calendar-move-hook)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-scroll-right (&optional arg event)
"Scroll the displayed calendar window right by ARG months.
If ARG is negative the calendar is scrolled left. Maintains the relative
last-nonmenu-event))
(calendar-scroll-left (- (or arg 1)) event))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-scroll-left-three-months (arg)
"Scroll the displayed calendar window left by 3*ARG months.
If ARG is negative the calendar is scrolled right. Maintains the relative
(interactive "p")
(calendar-scroll-left (* 3 arg)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-scroll-right-three-months (arg)
"Scroll the displayed calendar window right by 3*ARG months.
If ARG is negative the calendar is scrolled left. Maintains the relative
(interactive "p")
(calendar-scroll-left (* -3 arg)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-cursor-to-nearest-date ()
"Move the cursor to the closest date.
The position of the cursor is unchanged if it is already on a date.
(re-search-backward "[0-9]" nil t)))
(calendar-cursor-to-date))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-forward-day (arg)
"Move the cursor forward ARG days.
Moves backward if ARG is negative."
(calendar-cursor-to-visible-date new-cursor-date)))
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-backward-day (arg)
"Move the cursor back ARG days.
Moves forward if ARG is negative."
(interactive "p")
(calendar-forward-day (- arg)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-forward-week (arg)
"Move the cursor forward ARG weeks.
Moves backward if ARG is negative."
(interactive "p")
(calendar-forward-day (* arg 7)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-backward-week (arg)
"Move the cursor back ARG weeks.
Moves forward if ARG is negative."
(interactive "p")
(calendar-forward-day (* arg -7)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-beginning-of-week (arg)
"Move the cursor back ARG calendar-week-start-day's."
(interactive "p")
(+ (mod (- day calendar-week-start-day) 7)
(* 7 (1- arg)))))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-end-of-week (arg)
"Move the cursor forward ARG calendar-week-start-day+6's."
(interactive "p")
(+ (- 6 (mod (- day calendar-week-start-day) 7))
(* 7 (1- arg)))))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-beginning-of-month (arg)
"Move the cursor backward ARG month beginnings."
(interactive "p")
(calendar-cursor-to-visible-date (list month 1 year))
(calendar-backward-month (1- arg)))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-end-of-month (arg)
"Move the cursor forward ARG month ends."
(interactive "p")
(calendar-cursor-to-visible-date last-day))))
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-beginning-of-year (arg)
"Move the cursor backward ARG year beginnings."
(interactive "p")
(calendar-cursor-to-visible-date (list 1 1 displayed-year)))))
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-end-of-year (arg)
"Move the cursor forward ARG year beginnings."
(interactive "p")
(calendar-cursor-to-visible-date (list 12 31 displayed-year)))))
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-cursor-to-visible-date (date)
"Move the cursor to DATE that is on the screen."
(let* ((month (extract-calendar-month date))
(- (calendar-day-of-week date)
calendar-week-start-day)
7))))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-date (date)
"Move cursor to DATE."
(interactive (list (calendar-read-date)))
(calendar-cursor-to-visible-date date)
(run-hooks 'calendar-move-hook))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-day-of-year (year day &optional noecho)
"Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is t.
Negative DAY counts backward from end of year."
(provide 'cal-move)
-;; Local Variables:
-;; generated-autoload-file: "cal-loaddefs.el"
-;; End:
-
;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
;;; cal-move.el ends here
(list month 1 year))))))
(list month day year)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-persian-date-string (&optional date)
"String of Persian date of Gregorian DATE, default today."
(let* ((persian-date (calendar-persian-from-absolute
(year (int-to-string y)))
(mapconcat 'eval calendar-date-display-form ""))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-print-persian-date ()
"Show the Persian calendar equivalent of the selected date."
(interactive)
(message "Persian date: %s"
(calendar-persian-date-string (calendar-cursor-to-date t))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-persian-date (date &optional noecho)
"Move cursor to Persian date DATE.
Echo Persian date unless NOECHO is t."
(defvar date)
;; To be called from list-sexp-diary-entries, where DATE is bound.
+;;;###diary-autoload
(defun diary-persian-date ()
"Persian calendar equivalent of date diary entry."
(format "Persian date: %s" (calendar-persian-date-string date)))
(provide 'cal-persia)
-;; Local Variables:
-;; generated-autoload-file: "cal-loaddefs.el"
-;; End:
-
;; arch-tag: 2832383c-e4b4-4dc2-8ee9-cfbdd53e5e2d
;;; cal-persia.el ends here