;ELC   
;;; compiled by rms@mole.gnu.ai.mit.edu on Tue Feb 27 23:40:52 1996
;;; from file /home/fsf/rms/e19/lisp/cal-islam.el
;;; emacs version 19.30.92.1.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`cal-islam.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!\f B" [require cal-julian boundp calendar-islamic-month-name-array ["Muharram" "Safar" "Rabi I" "Rabi II" "Jumada I" "Jumada II" "Rajab" "Sha'ban" "Ramadan" "Shawwal" "Dhu al-Qada" "Dhu al-Hijjah"] current-load-list] 2)
#@76 Absolute date of start of Islamic calendar = August 29, 284 A.D. (Julian).
(defvar calendar-islamic-epoch (calendar-absolute-from-julian (quote (7 16 622))) (#$ . 723))
#@59 Returns t if YEAR is a leap year on the Islamic calendar.
(defalias 'islamic-calendar-leap-year-p #[(year) "̯>" [year 30 2 5 7 10 13 16 18 21 24 26 29] 12 (#$ . 898)])
#@60 The last day in MONTH during YEAR on the Islamic calendar.
(defalias 'islamic-calendar-last-day-of-month #[(month year) "Ư> Ǉ̯> ͇!& Ǉ͇" [month 1 3 5 7 9 11 30 2 4 6 8 10 29 islamic-calendar-leap-year-p year] 7 (#$ . 1088)])
#@65 Return the day number within the year of the Islamic date DATE.
(defalias 'islamic-calendar-day-number #[(date) "@)A@)	å_	Så_\\\n\\*" [date month day 2 30 29] 4 (#$ . 1345)])
#@144 Absolute date of Islamic DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-absolute-from-islamic #[(date) "@)A@)AA@)ĦW# ǂ~ W- ɂ~ W7 ˂~ WA Ƃ~ WK ΂~ WU Ђ~ W_ Ȃ~ Wi ӂ~ Ws ʂ~ W} ւ~ !S_\\ĥ_\\\\S\\-" [date month day year 30 y 3 0 6 1 8 2 11 14 4 17 5 19 22 7 25 27 9 10 leap-years-in-cycle islamic-calendar-day-number 354 calendar-islamic-epoch] 4 (#$ . 1540)])
#@187 Compute the Islamic date (month day year) corresponding to absolute DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-islamic-from-absolute #[(date) "	W E	ZåȉTE!Y0 \\T *\\	\n\n\n	\"	E!VX \\\nT\n: *T\f\f	E!SZ\f	E," [date calendar-islamic-epoch 0 355 approx sum y calendar-absolute-from-islamic 1 year m islamic-calendar-last-day-of-month month day] 7 (#$ . 2061)])
#@206 String of Islamic date before sunset of Gregorian DATE.
Returns the empty string if DATE is pre-Islamic.
Defaults to today's date if DATE is not given.
Driven by the variable `calendar-date-display-form'.
(defalias 'calendar-islamic-date-string #[(&optional date) "\n  AA@)S\n@)\nA@)\nAA@)S_\\	Vk 	_\\ͥZ	˦Ub ϦU?b ЦU)k 	T		-\f_\\\f˥\\\fϥ[\\\fХ\\*!AA@)W Ղ #*" [calendar-islamic-month-name-array calendar-islamic-from-absolute date calendar-current-date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 islamic-date calendar-month-name-array 1 "" calendar-date-string nil t] 8 (#$ . 2585)])
#@68 Show the Islamic calendar equivalent of the date under the cursor.
(defalias 'calendar-print-islamic-date #[nil "!!Ę ! \")" [calendar-islamic-date-string calendar-cursor-to-date t i "" message "Date is pre-Islamic" "Islamic date (until sunset): %s"] 4 (#$ . 3277) nil])
#@68 Move cursor to Islamic DATE; echo Islamic date unless NOECHO is t.
(defalias 'calendar-goto-islamic-date #[(date &optional noecho) "!!!\f  " [calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-islamic date noecho calendar-print-islamic-date] 4 (#$ . 3569) (let* ((today (calendar-current-date)) (year (calendar-read "Islamic calendar year (>0): " (quote (lambda (x) (> x 0))) (int-to-string (extract-calendar-year (calendar-islamic-from-absolute (calendar-absolute-from-gregorian today)))))) (month-array calendar-islamic-month-name-array) (completion-ignore-case t) (month (cdr (assoc (capitalize (completing-read "Islamic calendar month name: " (mapcar (quote list) (append month-array nil)) nil t)) (calendar-make-alist month-array 1 (quote capitalize))))) (last (islamic-calendar-last-day-of-month month year)) (day (calendar-read (format "Islamic calendar day (1-%d): " last) (quote (lambda (x) (and (< 0 x) (<= x last))))))) (list (list month day year)))])
#@50 Islamic calendar equivalent of date diary entry.
(defalias 'diary-islamic-date #[nil "!!Ę ł \")" [calendar-islamic-date-string calendar-cursor-to-date t i "" "Date is pre-Islamic" format "Islamic date (until sunset): %s"] 4 (#$ . 4571)])
#@254 Holiday on MONTH, DAY (Islamic) called STRING.
If MONTH, DAY (Islamic) 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-islamic #[(month day string) "	EAA@)S\f@)\fA@)\fAA@)S_\\\nVl \n_\\ΥZ\n̦Uc ЦU?c ѦU)l \nT\n\n-_\\̥\\Х[\\ѥ\\*!@)AA@)W? _\\Z\\\\ئTإ)V E!!\f! \fDC)," [calendar-islamic-from-absolute displayed-month 15 displayed-year date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 islamic-date m y nil 1 12 -1 macro-y 7 calendar-gregorian-from-absolute calendar-absolute-from-islamic calendar-date-is-visible-p string] 7 (#$ . 4830)])
#@642 Add any Islamic date entries from the diary file to `diary-entries-list'.
Islamic date diary entries must be prefaced by an `islamic-diary-entry-symbol'
(normally an `I').  The same diary date forms govern the style of the Islamic
calendar entries, except that the Islamic month names must be spelled in full.
The Islamic months are numbered from 1 to 12 with Muharram being 1 and 12 being
Dhu al-Hijjah.  If an Islamic date diary entry begins with a
`diary-nonmarking-symbol', the entry will appear in the diary listing, but will
not be marked in the calendar.  This function is provided for use with the
`nongregorian-diary-listing-hook'.
(defalias 'list-islamic-diary-entries #[nil "	W \f!	\n	TYv\fAA@)S@)A@)AA@)S_\\V _\\٥ZצU ڦU? ۦU) T-_\\ץ\\ڥ[\\ۥ\\*!@)A@)AA@)@@ޚ @A @@@ޚ!!OR$%&!P)!P!P!,8ڦ!P9Q0!#68eb6#j#h\"xh\"!@ A !V`BCD !`BE $!E #@ A !F B`%G C`{\"*V.\nA -H AA@)S@)A@)AA@)S_\\VV_\\٥ZצUMڦU?MۦU)VT-_\\ץ\\ڥ[\\ۥ\\*T! )I 	!,eb" [0 number nil buffer-modified-p original-date regexp-quote diary-nonmarking-symbol mark gdate diary-modified buffer-read-only i diary-date-forms d calendar-islamic-from-absolute date prior-years month day year 31 day-of-year 2 4 23 10 100 400 365 idate backup date-form calendar-day-name "\\|" 3 ".?" dayname calendar-islamic-month-name-array calendar-month-name-array "\\*\\|" calendar-month-name monthname "\\*\\|0*" int-to-string abbreviated-calendar-year "" "\\(\\`\\|\\|\n\\)" "?" islamic-diary-entry-symbol "\\(" mapconcat eval "\\)\\(" "\\)" regexp t case-fold-search re-search-forward re-search-backward "\\<" char-equal 13 looking-at " \\|	" backward-char 1 date-start entry-start "\\|\n\\|\\`" "\\|\n" subst-char-in-region add-to-diary-list calendar-gregorian-from-absolute set-buffer-modified-p] 10 (#$ . 5673)])
#@667 Mark days in the calendar window that have Islamic date diary entries.
Each entry in diary-file (or included files) visible in the calendar window
is marked.  Islamic date entries are prefaced by a islamic-diary-entry-symbol
(normally an `I').  The same diary-date-forms govern the style of the Islamic
calendar entries, except that the Islamic month names must be spelled in full.
The Islamic months are numbered from 1 to 12 with Muharram being 1 and 12 being
Dhu al-Hijjah.  Islamic date diary entries that begin with a
diary-nonmarking-symbol will not be marked in the calendar.  This function is
provided for use as part of the nongregorian-diary-marking-hook.
(defalias 'mark-islamic-diary-entries #[nil "W	@@ 	@A 	@!\"P\n\fG>GZU?G \\>GZU?_ \\>GZU?w \\>GZU? \\>GZU? \\!#ݰeb#M {\" {# { !&{	!'{(\"(GU* --AA@)S.---@)\f--A@)--AA@)\fS_\\0\fV0\f_\\Z0UU?U)0T00-._\\.\\.[\\.\\*!-AA@)7(!7_\\87ZV8Z78ZV8\\8*(!:\"\"O!@ #\"A!H#=#A 0&=#!!\"A&B &':#. .	A )" [diary-date-forms d backup date-form diary-name-pattern calendar-day-name-array dayname calendar-islamic-month-name-array t "\\|\\*" monthname "[0-9]+\\|\\*" month day year l d-name-pos 2 m-name-pos d-pos m-pos y-pos "\\(\\`\\|\\|\n\\)" regexp-quote islamic-diary-entry-symbol "\\(" mapconcat eval "\\)\\(" "\\)" regexp case-fold-search re-search-forward nil dd-name mm-name string-to-int "" mm dd y-str 0 abbreviated-calendar-year calendar-islamic-from-absolute calendar-current-date date prior-years 31 day-of-year 4 23 10 100 400 365 current-y y 50 yy mark-calendar-days-named assoc capitalize 3 calendar-make-alist (lambda (x) (substring x 0 3)) "*" mark-islamic-calendar-date-pattern] 8 (#$ . 7856)])
#@120 Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.
A value of 0 in any position is a wildcard.
(defalias 'mark-islamic-calendar-date-pattern #[(month day year) "q	UU\fU/ 	\fE!!!+ !)EAA@)S@)A@)AA@)	S_\\	V 	_\\ԥZ\fҦU \fզU? \f֦U) T-_\\ҥ\\ե[\\֥\\*!@)AA@)W?_\\	Z\\\\ݦTݥ)V	E!!!!),ۉ!\"_\\\\ݦTݥ)EAA@)S@)A@)AA@)	S_\\	V	_\\ԥZ\fҦU\fզU?\f֦U)T-_\\ҥ\\ե[\\֥\\*\"_\\\\ݦTݥ)U\fҦU\fզU?\f֦U)\n	SH*EAA@)S@)A@)AA@)	S_\\	Vt	_\\ԥZ\fҦUk\fզU?k\f֦U)tT-_\\ҥ\\ե[\\֥\\*!\"S!TY!&@)'&A@)(&AA@))	U	'UU(U\fU\f)U!!,-)" [calendar-buffer month 0 day year calendar-gregorian-from-absolute calendar-absolute-from-islamic date calendar-date-is-visible-p mark-visible-calendar-date calendar-islamic-from-absolute displayed-month 15 displayed-year prior-years 31 day-of-year 2 4 23 10 100 400 365 islamic-date m y nil 1 12 -1 macro-y 7 last-date first-date -2 29 [31 28 31 30 31 30 31 31 30 31 30 31] i-date i-month i-day i-year] 7 (#$ . 9910)])
#@133 Insert a diary entry.
For the Islamic date corresponding to the date indicated by point.
Prefix arg will make the entry nonmarking.
(defalias 'insert-islamic-diary-entry #[(arg) "!AA@)S	@)\nA@)AA@)\f\nS_\\\nVz \n_\\ҥZ\f\fЦUq \fԦU?q \fզU)z T-	_\\	Х\\	ԥ[\\	ե\\*!#P\")" [calendar-islamic-month-name-array calendar-month-name-array make-diary-entry islamic-diary-entry-symbol calendar-date-string calendar-islamic-from-absolute calendar-cursor-to-date t date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 nil arg] 10 (#$ . 11329) "P"])
#@153 Insert a monthly diary entry.
For the day of the Islamic month corresponding to the date indicated by point.
Prefix arg will make the entry nonmarking.
(defalias 'insert-monthly-islamic-diary-entry #[(arg) " 	 \f!\f\fAA@)S\f\f\f@)\f\fA@)\f\fAA@)S_\\V _\\֥ZԦU| ئU?| ٦U) T-_\\ԥ\\إ[\\٥\\*!!P\"*" [european-calendar-style (day " * ") ("* " day) calendar-date-display-form calendar-islamic-month-name-array calendar-month-name-array make-diary-entry islamic-diary-entry-symbol calendar-date-string calendar-islamic-from-absolute calendar-cursor-to-date t date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 arg] 10 (#$ . 11975) "P"])
#@152 Insert an annual diary entry.
For the day of the Islamic year corresponding to the date indicated by point.
Prefix arg will make the entry nonmarking.
(defalias 'insert-yearly-islamic-diary-entry #[(arg) " 	 \f!\f\fAA@)S\f\f\f@)\f\fA@)\f\fAA@)S_\\V _\\֥ZԦU| ئU?| ٦U) T-_\\ԥ\\إ[\\٥\\*!!P\"*" [european-calendar-style (day " " monthname) (monthname " " day) calendar-date-display-form calendar-islamic-month-name-array calendar-month-name-array make-diary-entry islamic-diary-entry-symbol calendar-date-string calendar-islamic-from-absolute calendar-cursor-to-date t date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 arg] 10 (#$ . 12729) "P"])
(provide (quote cal-islam))
