(require 'calendar)
-;;;###autoload
+;;;###cal-autoload
(defun calendar-julian-from-absolute (date)
"Compute the Julian (month day year) corresponding to the absolute DATE.
The absolute date is the number of days elapsed since the (imaginary)
(/ (1- year) 4)
-2)))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-julian-date-string (&optional date)
"String of Julian date of Gregorian DATE.
Defaults to today's date if DATE is not given.
(or date (calendar-current-date))))
nil t))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-print-julian-date ()
"Show the Julian calendar equivalent of the date under the cursor."
(interactive)
(message "Julian date: %s"
(calendar-julian-date-string (calendar-cursor-to-date t))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-julian-date (date &optional noecho)
"Move cursor to Julian DATE; echo Julian date unless NOECHO is t."
(interactive
(defvar displayed-month)
(defvar displayed-year)
+;;;###holiday-autoload
(defun holiday-julian (month day string)
"Holiday on MONTH, DAY (Julian) called STRING.
If MONTH, DAY (Julian) is visible, the value returned is corresponding
(if (calendar-date-is-visible-p date)
(list (list date string)))))))
-(defvar date)
-
-;; To be called from list-sexp-diary-entries, where DATE is bound.
-(defun diary-julian-date ()
- "Julian calendar equivalent of date diary entry."
- (format "Julian date: %s" (calendar-julian-date-string date)))
-
-;;;###autoload
+;;;###cal-autoload
(defun calendar-absolute-from-astro (d)
"Absolute date of astronomical (Julian) day number D."
(- d 1721424.5))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-astro-from-absolute (d)
"Astronomical (Julian) day number of absolute date D."
(+ d 1721424.5))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-astro-date-string (&optional date)
"String of astronomical (Julian) day number after noon UTC of Gregorian DATE.
Defaults to today's date if DATE is not given."
(calendar-absolute-from-gregorian
(or date (calendar-current-date)))))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-print-astro-day-number ()
"Show astronomical (Julian) day number after noon UTC on cursor date."
(interactive)
"Astronomical (Julian) day number (at noon UTC): %s.0"
(calendar-astro-date-string (calendar-cursor-to-date t))))
-;;;###autoload
+;;;###cal-autoload
(defun calendar-goto-astro-day-number (daynumber &optional noecho)
"Move cursor to astronomical (Julian) DAYNUMBER.
Echo astronomical (Julian) day number unless NOECHO is t."
(calendar-absolute-from-astro daynumber))))
(or noecho (calendar-print-astro-day-number)))
+
+(defvar date)
+
+;; To be called from list-sexp-diary-entries, where DATE is bound.
+;;;###diary-autoload
+(defun diary-julian-date ()
+ "Julian calendar equivalent of date diary entry."
+ (format "Julian date: %s" (calendar-julian-date-string date)))
+
;; To be called from list-sexp-diary-entries, where DATE is bound.
+;;;###diary-autoload
(defun diary-astro-day-number ()
"Astronomical (Julian) day number diary entry."
(format "Astronomical (Julian) day number at noon UTC: %s.0"
(provide 'cal-julian)
-;; Local Variables:
-;; generated-autoload-file: "cal-loaddefs.el"
-;; End:
-
;; arch-tag: 0520acdd-1c60-4188-9aa8-9b8c24d856ae
;;; cal-julian.el ends here