;ELC   
;;; compiled by kwzh@churchy.gnu.ai.mit.edu on Mon May 20 12:02:57 1996
;;; from file /gd/gnu/emacs/19.0/lisp/cal-persia.el
;;; emacs version 19.30.99.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-persia.el' was compiled for Emacs 19.29 or later"))


(byte-code "ÀÁ!ˆÂÃ!„\f ÄÃBÀ‡" [require cal-julian boundp persian-calendar-month-name-array ["Farvardin" "Ordibehest" "Xordad" "Tir" "Mordad" "Sahrivar" "Mehr" "Aban" "Azar" "Dey" "Bahman" "Esfand"] current-load-list] 2)
#@75 Absolute date of start of Persian calendar = March 19, 622 A.D. (Julian).
(defvar persian-calendar-epoch (calendar-absolute-from-julian (quote (3 19 622))) (#$ . 706))
#@54 True if YEAR is a leap year on the Persian calendar.
(defalias 'persian-calendar-leap-year-p #[(year) "À‰‰Á\nXƒ \nÃ\\‚ \nÄ\\Å\"Æ\"Ç_Å\"ÇW‡" [mod 0 year 2346 2347 2820 768 683] 5 (#$ . 880)])
#@57 Return last day of MONTH, YEAR on the Persian calendar.
(defalias 'persian-calendar-last-day-of-month #[(month year) "ÁWƒ Â‡ÃW„ Ä!ƒ Æ‡Ç‡" [month 7 31 12 persian-calendar-leap-year-p year 30 29] 2 (#$ . 1079)])
#@159 Compute absolute date from Persian date DATE.
The absolute date is the number of days elapsed since the (imaginary)
Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-absolute-from-persian #[(date) "‰@)‰A@)‰AA@)	ÄWƒ/ Å\nÆ	Ç\"TE!È	Ç\"É_\\‚‚ \nS	SË_\\È	Ì\\Ç\"Í_\\ÈÆ	Ì\\Ç\"Î\"Ï_\\ÈÆ‰	Ì\\Ç\"Î\"Í_Ç\"\\ÐÄ‰Wƒz Ó	\"\\T‰‚b *\\\n\\Ô\\+‡" [date year day month 0 calendar-absolute-from-persian mod 2820 floor 1029983 persian-calendar-epoch 365 2345 683 768 186 1 sum m persian-calendar-last-day-of-month -568] 7 (#$ . 1302)])
#@50 Persian year corresponding to the absolute DATE.
(defalias 'calendar-persian-year-from-absolute #[(date) "ÁÂ‰ÃE!ZÅ\fÆ\"È\fÆ\"	Å	Ê\"È	Ê\"\fÅ\fÍ\"È\fÍ\"‰ÅÐ_Ñ_\\Ð\\Æ\"\\Â\\*Ñ_Ó_\\	ÔUƒ\\ S‚^ \\Ã\\‰ÂWƒo S‚q .‡" [date calendar-absolute-from-persian 1 -2345 d0 floor 1029983 n2820 mod d1 280506 n768 d2 366 b a 2137 2820 n1 768 1029617 year] 6 (#$ . 1862)])
#@217 Compute the Persian equivalent for absolute date DATE.
The result is a list of the form (MONTH DAY YEAR).
The absolute date is the number of days elapsed since the imaginary
Gregorian date Sunday, December 31, 1 BC.
(defalias 'calendar-persian-from-absolute #[(date) "À	!ÃÄ	ÇÈ\n\"\nE!Vƒ% Ã\\T‚	 *T		Ç	Ã\nE!SZ\n	\n\nE+‡" [calendar-persian-year-from-absolute date year 1 0 sum m calendar-absolute-from-persian persian-calendar-last-day-of-month month day] 6 (#$ . 2258)])
#@90 String of Persian date of Gregorian DATE.
Defaults to today's date if DATE is not given.
(defalias 'calendar-persian-date-string #[(&optional date) "À	† Â ‰‰AA@)S	‰‰@)	‰A@)	‰AA@)\fSÇ_\\\fÉVƒh \fÊ_Ë\\Ì¥Z‰Ê¦ÍU…_ Î¦ÍU?†_ Ï¦ÍU)ƒh T-Ð_\\Ê¥\\Î¥[\\Ï¥\\*!‰‰AA@)‰@)SHÕ‰A@)!ÖÕ!Õ!ÙÚÜ#.‡" [calendar-persian-from-absolute date calendar-current-date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 persian-date y m persian-calendar-month-name-array int-to-string nil dayname monthname mapconcat eval calendar-date-display-form ""] 7 (#$ . 2754)])
#@60 Show the Persian calendar equivalent of the selected date.
(defalias 'calendar-print-persian-date #[nil "ÀÁÂÃÄ!!\"‡" [message "Persian date: %s" calendar-persian-date-string calendar-cursor-to-date t] 5 (#$ . 3380) nil])
#@73 Move cursor to Persian date DATE.
Echo Persian date unless NOECHO is t.
(defalias 'calendar-goto-persian-date #[(date &optional noecho) "ÀÁÂ!!!ˆ\f† Å ‡" [calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-persian date noecho calendar-print-persian-date] 4 (#$ . 3607) (persian-prompt-for-date)])
#@25 Ask for a Persian date.
(defalias 'persian-prompt-for-date #[nil "À ÂÃÄÅÆ	‰‰AA@)S‰‰@)	‰A@)\n‰AA@)\n	SÌ_\\	ÎVƒz 	Ï_Ð\\Ñ¥Z‰Ï¦ÒU…q Ó¦ÒU?†q Ô¦ÒU)ƒz T-Õ_\\Ï¥\\Ó¥[\\Ô¥\\*!‰AA@)!#ÖØÙÚÛÜÝÞà\"\"àÖ$!áâÙ#\"A	ã	\"$Âåæ$\"ç\"\n	\nE.C‡" [calendar-current-date today calendar-read "Persian calendar year (not 0): " (lambda (x) (/= x 0)) int-to-string calendar-persian-from-absolute date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 t completion-ignore-case assoc capitalize completing-read "Persian calendar month name: " mapcar list append persian-calendar-month-name-array nil calendar-make-alist 1 persian-calendar-last-day-of-month last format "Persian calendar day (1-%d): " (lambda (x) (and (< 0 x) (<= x last)))] 11 (#$ . 3935)])
#@50 Persian calendar equivalent of date diary entry.
(defalias 'diary-persian-date #[nil "ÀÁÂ!!‡" [calendar-persian-date-string calendar-cursor-to-date t] 3 (#$ . 4762)])
(provide (quote cal-persia))
