Mercurial > emacs
comparison lisp/calendar/cal-persia.el @ 93225:da8dabfafecc
Require calendar rather than cal-julian.
Autoload calendar-absolute-from-julian.
(persian-calendar-epoch): Set when compiling.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 26 Mar 2008 03:12:02 +0000 |
parents | 3c66b698cc43 |
children | 426872139a89 |
comparison
equal
deleted
inserted
replaced
93224:e800589311a9 | 93225:da8dabfafecc |
---|---|
30 ;; This collection of functions implements the features of calendar.el and | 30 ;; This collection of functions implements the features of calendar.el and |
31 ;; diary.el that deal with the Persian calendar. | 31 ;; diary.el that deal with the Persian calendar. |
32 | 32 |
33 ;;; Code: | 33 ;;; Code: |
34 | 34 |
35 (require 'cal-julian) | 35 (require 'calendar) |
36 | 36 |
37 (defconst persian-calendar-month-name-array | 37 (defconst persian-calendar-month-name-array |
38 ["Farvardin" "Ordibehest" "Xordad" "Tir" "Mordad" "Sahrivar" "Mehr" "Aban" | 38 ["Farvardin" "Ordibehest" "Xordad" "Tir" "Mordad" "Sahrivar" "Mehr" "Aban" |
39 "Azar" "Dey" "Bahman" "Esfand"] | 39 "Azar" "Dey" "Bahman" "Esfand"] |
40 "Names of the months in the Persian calendar.") | 40 "Names of the months in the Persian calendar.") |
41 | 41 |
42 (defconst persian-calendar-epoch (calendar-absolute-from-julian '(3 19 622)) | 42 (eval-and-compile |
43 (autoload 'calendar-absolute-from-julian "cal-julian")) | |
44 | |
45 (defconst persian-calendar-epoch | |
46 (eval-when-compile (calendar-absolute-from-julian '(3 19 622))) | |
43 "Absolute date of start of Persian calendar = March 19, 622 AD (Julian).") | 47 "Absolute date of start of Persian calendar = March 19, 622 AD (Julian).") |
44 | 48 |
45 (defun persian-calendar-leap-year-p (year) | 49 (defun persian-calendar-leap-year-p (year) |
46 "True if YEAR is a leap year on the Persian calendar." | 50 "True if YEAR is a leap year on the Persian calendar." |
47 (< (mod (* (mod (mod (if (<= 0 year) | 51 (< (mod (* (mod (mod (if (<= 0 year) |