;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:37:06 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/calendar/cal-julian.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`cal-julian.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(require 'calendar)
#@185 Compute the Julian (month day year) corresponding to the absolute DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-julian-from-absolute #[(date) "\306\\\307\245\211\211\310\311\312\211TE!Y\203  \nTT\202 \n*\\\312\310\311\211\306U\203= \f\313\246\310U\203= \314\202A \315SH\fE!V\203Q \nTT\202( \n*T\311\312\fE!SZ\fE,\207" [date approx sum y year m 2 366 0 calendar-absolute-from-julian 1 4 29 [31 28 31 30 31 30 31 31 30 31 30 31] month day] 7 (#$ . 652)])
#@135 The number of days elapsed between the Gregorian date 12/31/1 BC and DATE.
The Gregorian date Sunday, December 31, 1 BC is imaginary.
(defalias 'calendar-absolute-from-julian #[(date) "\211@)\211A@)\211AA@)\305!\306!\307!\n\310S_\\\311V\203C \f\312\313_\\\314\245Z\315	!\203C \fT\f-	\316\246\317U\203_ 	\320\246\317U\204_ \311V\203_ \321\202` \317\\	S\322_\\	S\313\245\\\323\\+\207" [date year day month day-of-year extract-calendar-month extract-calendar-day extract-calendar-year 31 2 23 4 10 calendar-leap-year-p 100 0 400 1 365 -2] 5 (#$ . 1234)])
#@142 String of Julian date of Gregorian DATE.
Defaults to today's date if DATE is not given.
Driven by the variable `calendar-date-display-form'.
(defalias 'calendar-julian-date-string #[(&optional date) "\302\303\206 \304 \305!S\306!\307	_\\	\310\245\\	\311\245[\\	\312\245\\*!\313\314#\207" [date prior-years calendar-date-string calendar-julian-from-absolute calendar-current-date extract-calendar-year calendar-day-number 365 4 100 400 nil t] 5 (#$ . 1817)])
#@67 Show the Julian calendar equivalent of the date under the cursor.
(defalias 'calendar-print-julian-date #[nil "\300\301\302\303\304!!\"\207" [message "Julian date: %s" calendar-julian-date-string calendar-cursor-to-date t] 5 (#$ . 2287) nil])
#@66 Move cursor to Julian DATE; echo Julian date unless NOECHO is t.
(defalias 'calendar-goto-julian-date #[(date &optional noecho) "\302\303\304!!!\210	\206 \305 \207" [date noecho calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-julian calendar-print-julian-date] 4 (#$ . 2536) (let* ((today (calendar-current-date)) (year (calendar-read "Julian calendar year (>0): " '(lambda (x) (> x 0)) (int-to-string (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian today)))))) (month-array calendar-month-name-array) (completion-ignore-case t) (month (cdr (assoc-ignore-case (completing-read "Julian calendar month name: " (mapcar 'list (append month-array nil)) nil t) (calendar-make-alist month-array 1)))) (last (if (and (zerop (% year 4)) (= month 2)) 29 (aref [31 28 31 30 31 30 31 31 30 31 30 31] (1- month)))) (day (calendar-read (format "Julian calendar day (%d-%d): " (if (and (= year 1) (= month 1)) 3 1) last) '(lambda (x) (and (< (if (and (= year 1) (= month 1)) 2 0) x) (<= x last)))))) (list (list month day year)))])
#@253 Holiday on MONTH, DAY  (Julian) called STRING.
If MONTH, DAY (Julian) is visible, the value returned is corresponding
Gregorian date in the form of the list (((month day year) STRING)).  Returns
nil if it is not visible in the current calendar window.
(defalias 'holiday-julian #[(month day string) "		\306\307_\\\310\\\211\307\246T\307\245)\307_\f\\\211\307\246T\307\245)\311E\312!S\313!\314_\\\315\245\\\316\245[\\\317\245\\*\f\211\211\320U\203s \321\n!\203s \322\202x \323SH*E\312!S\313!\314_\\\315\245\\\316\245[\\\317\245\\*\324! \324!! \211AA@)\"!\211AA@)#\325W\203\316 \"\202\320 #\326\327$\nE!!\330!\205\352 %DC.\f\207" [displayed-month displayed-year year y2 m2 y1 nil 12 -2 1 extract-calendar-year calendar-day-number 365 4 100 400 2 calendar-leap-year-p 29 [31 28 31 30 31 30 31 31 30 31 30 31] calendar-julian-from-absolute 10 calendar-gregorian-from-absolute calendar-absolute-from-julian calendar-date-is-visible-p m1 macro-y date prior-years start-date month end-date julian-start julian-end julian-y1 julian-y2 day string] 6 (#$ . 3629)])
#@49 Julian calendar equivalent of date diary entry.
(defalias 'diary-julian-date #[nil "\301\302\303!\"\207" [date format "Julian date: %s" calendar-julian-date-string] 4 (#$ . 4790)])
#@54 Absolute date of astronomical (Julian) day number D.
(defalias 'calendar-absolute-from-astro #[(d) "\301Z\207" [d 1721424.5] 2 (#$ . 4978)])
#@54 Astronomical (Julian) day number of absolute date D.
(defalias 'calendar-astro-from-absolute #[(d) "\301\\\207" [d 1721424.5] 2 (#$ . 5126)])
#@125 String of astronomical (Julian) day number after noon UTC of Gregorian DATE.
Defaults to today's date if DATE is not given.
(defalias 'calendar-astro-date-string #[(&optional date) "\302\303\304\206	 \305 \306!S\307!\310	_\\	\311\245\\	\312\245[\\	\313\245\\*!!!\207" [date prior-years int-to-string ceiling calendar-astro-from-absolute calendar-current-date extract-calendar-year calendar-day-number 365 4 100 400] 6 (#$ . 5276)])
#@79 Show astronomical (Julian) day number after noon UTC on date shown by cursor.
(defalias 'calendar-print-astro-day-number #[nil "\300\301\302\303\304!!\"\207" [message "Astronomical (Julian) day number (at noon UTC): %s.0" calendar-astro-date-string calendar-cursor-to-date t] 5 (#$ . 5719) nil])
#@107 Move cursor to astronomical (Julian) DAYNUMBER.
Echo astronomical (Julian) day number unless NOECHO is t.
(defalias 'calendar-goto-astro-day-number #[(daynumber &optional noecho) "\302\303\304\305!!!!\210	\206 \306 \207" [daynumber noecho calendar-goto-date calendar-gregorian-from-absolute floor calendar-absolute-from-astro calendar-print-astro-day-number] 5 (#$ . 6022) (list (calendar-read "Astronomical (Julian) day number (>1721425): " '(lambda (x) (> x 1721425))))])
#@47 Astronomical (Julian) day number diary entry.
(defalias 'diary-astro-day-number #[nil "\301\302\303!\"\207" [date format "Astronomical (Julian) day number at noon UTC: %s.0" calendar-astro-date-string] 4 (#$ . 6504)])
(provide 'cal-julian)
