diff options
| author | Glenn Morris | 2008-04-05 20:55:08 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-04-05 20:55:08 +0000 |
| commit | 8fc9e5a0c35a5c3c60d8ba46af7e3ca385b8cdb2 (patch) | |
| tree | 83e0a55a4fef70f5303ff40a5e6e1c1f0bf532a5 | |
| parent | 4f1c166c4ac9e308db9c8671b7adb3e841a5a90a (diff) | |
| download | emacs-8fc9e5a0c35a5c3c60d8ba46af7e3ca385b8cdb2.tar.gz emacs-8fc9e5a0c35a5c3c60d8ba46af7e3ca385b8cdb2.zip | |
(calendar-hebrew-leap-year-p): Rename hebrew-calendar-leap-year-p.
Update callers.
(calendar-hebrew-last-month-of-year): Rename hebrew-calendar-last-month-of-year.
Update callers.
(calendar-hebrew-elapsed-days): Rename hebrew-calendar-elapsed-days.
Update callers.
(calendar-hebrew-days-in-year): Rename hebrew-calendar-days-in-year.
Update callers.
(calendar-hebrew-long-heshvan-p): Rename hebrew-calendar-long-heshvan-p.
Update callers.
(calendar-hebrew-short-kislev-p): Rename hebrew-calendar-short-kislev-p.
Update callers.
(calendar-hebrew-last-day-of-month): Rename hebrew-calendar-last-day-of-month.
Update callers.
(calendar-hebrew-to-absolute): Rename calendar-absolute-from-hebrew.
Keep old name as alias, update callers.
(calendar-hebrew-print-date): Rename calendar-print-hebrew-date.
Keep old name as alias, update callers.
(calendar-hebrew-yahrzeit): Rename hebrew-calendar-yahrzeit.
Keep old name as alias, update callers.
(calendar-hebrew-goto-date): Rename calendar-goto-hebrew-date.
Keep old name as alias.
(holiday-hebrew-rosh-hashanah): Rename holiday-rosh-hashanah-etc.
Keep old name as alias.
(holiday-hebrew-hanukkah): Rename holiday-hanukkah. Keep old name as alias.
(holiday-hebrew-passover): Rename holiday-passover-etc.
Keep old name as alias.
(holiday-hebrew-tisha-b-av): Rename holiday-tisha-b-av-etc.
Keep old name as alias, update callers.
(diary-hebrew-list-entries): Rename list-hebrew-diary-entries.
Keep old name as alias.
(calendar-hebrew-mark-date-pattern): Rename mark-hebrew-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-hebrew-mark-entries): Rename mark-hebrew-diary-entries.
Keep old name as alias.
(diary-hebrew-insert-entry): Rename insert-hebrew-diary-entry.
Keep old name as alias.
(diary-hebrew-insert-monthly-entry): Rename insert-monthly-hebrew-diary-entry.
Keep old name as alias.
(diary-hebrew-insert-yearly-entry): Rename insert-yearly-hebrew-diary-entry.
Keep old name as alias.
(calender-hebrew-list-yahrzeits): Rename list-yahrzeit-dates.
Keep old name as alias.
(diary-hebrew-omer): Rename diary-omer. Keep old name as alias.
(diary-hebrew-yahrzeit): Rename diary-yahrzeit. Keep old name as alias.
(diary-hebrew-rosh-hodesh): Rename diary-rosh-hodesh. Keep old name as alias.
(calendar-hebrew-parashiot-names): Rename hebrew-calendar-parashiot-names.
Update callers.
(calendar-hebrew-parasha-name): Rename hebrew-calendar-parasha-name.
(calendar-hebrew-year-Saturday-incomplete-Sunday):
Rename hebrew-calendar-year-Saturday-incomplete-Sunday.
(calendar-hebrew-year-Saturday-complete-Tuesday):
Rename hebrew-calendar-year-Saturday-complete-Tuesday.
(calendar-hebrew-year-Monday-incomplete-Tuesday):
Rename hebrew-calendar-year-Monday-incomplete-Tuesday.
(calendar-hebrew-year-Monday-complete-Thursday):
Rename hebrew-calendar-year-Monday-complete-Thursday.
(calendar-hebrew-year-Tuesday-regular-Thursday):
Rename hebrew-calendar-year-Tuesday-regular-Thursday.
(calendar-hebrew-year-Thursday-regular-Saturday):
Rename hebrew-calendar-year-Thursday-regular-Saturday.
(calendar-hebrew-year-Thursday-complete-Sunday):
Rename hebrew-calendar-year-Thursday-complete-Sunday.
(calendar-hebrew-year-Saturday-incomplete-Tuesday):
Rename hebrew-calendar-year-Saturday-incomplete-Tuesday.
(calendar-hebrew-year-Saturday-complete-Thursday):
Rename hebrew-calendar-year-Saturday-complete-Thursday.
(calendar-hebrew-year-Monday-incomplete-Thursday):
Rename hebrew-calendar-year-Monday-incomplete-Thursday.
(calendar-hebrew-year-Monday-complete-Saturday):
Rename hebrew-calendar-year-Monday-complete-Saturday.
(calendar-hebrew-year-Tuesday-regular-Saturday):
Rename hebrew-calendar-year-Tuesday-regular-Saturday.
(calendar-hebrew-year-Thursday-incomplete-Sunday):
Rename hebrew-calendar-year-Thursday-incomplete-Sunday.
(calendar-hebrew-year-Thursday-complete-Tuesday):
Rename hebrew-calendar-year-Thursday-complete-Tuesday.
(diary-hebrew-parasha): Rename diary-parasha. Keep old name as alias.
Update for above name changes of constants.
| -rw-r--r-- | lisp/calendar/cal-hebrew.el | 282 |
1 files changed, 171 insertions, 111 deletions
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 1eece2a0473..8374c9b2a8e 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el | |||
| @@ -34,17 +34,17 @@ | |||
| 34 | 34 | ||
| 35 | (require 'calendar) | 35 | (require 'calendar) |
| 36 | 36 | ||
| 37 | (defun hebrew-calendar-leap-year-p (year) | 37 | (defun calendar-hebrew-leap-year-p (year) |
| 38 | "Non-nil if YEAR is a Hebrew calendar leap year." | 38 | "Non-nil if YEAR is a Hebrew calendar leap year." |
| 39 | (< (% (1+ (* 7 year)) 19) 7)) | 39 | (< (% (1+ (* 7 year)) 19) 7)) |
| 40 | 40 | ||
| 41 | (defun hebrew-calendar-last-month-of-year (year) | 41 | (defun calendar-hebrew-last-month-of-year (year) |
| 42 | "The last month of the Hebrew calendar YEAR." | 42 | "The last month of the Hebrew calendar YEAR." |
| 43 | (if (hebrew-calendar-leap-year-p year) | 43 | (if (calendar-hebrew-leap-year-p year) |
| 44 | 13 | 44 | 13 |
| 45 | 12)) | 45 | 12)) |
| 46 | 46 | ||
| 47 | (defun hebrew-calendar-elapsed-days (year) | 47 | (defun calendar-hebrew-elapsed-days (year) |
| 48 | "Days to mean conjunction of Tishri of Hebrew YEAR. | 48 | "Days to mean conjunction of Tishri of Hebrew YEAR. |
| 49 | Measured from Sunday before start of Hebrew calendar." | 49 | Measured from Sunday before start of Hebrew calendar." |
| 50 | (let* ((months-elapsed | 50 | (let* ((months-elapsed |
| @@ -65,11 +65,11 @@ Measured from Sunday before start of Hebrew calendar." | |||
| 65 | (and (= (% day 7) 2) ; ...or is on a Tuesday... | 65 | (and (= (% day 7) 2) ; ...or is on a Tuesday... |
| 66 | (>= parts 9924) ; at 9 hours, 204 parts or later... | 66 | (>= parts 9924) ; at 9 hours, 204 parts or later... |
| 67 | ;; of a common year... | 67 | ;; of a common year... |
| 68 | (not (hebrew-calendar-leap-year-p year))) | 68 | (not (calendar-hebrew-leap-year-p year))) |
| 69 | (and (= (% day 7) 1) ; ...or is on a Monday... | 69 | (and (= (% day 7) 1) ; ...or is on a Monday... |
| 70 | (>= parts 16789) ; at 15 hours, 589 parts or later... | 70 | (>= parts 16789) ; at 15 hours, 589 parts or later... |
| 71 | ;; at the end of a leap year. | 71 | ;; at the end of a leap year. |
| 72 | (hebrew-calendar-leap-year-p (1- year)))) | 72 | (calendar-hebrew-leap-year-p (1- year)))) |
| 73 | ;; Then postpone Rosh HaShanah one day. | 73 | ;; Then postpone Rosh HaShanah one day. |
| 74 | (1+ day) | 74 | (1+ day) |
| 75 | ;; Else: | 75 | ;; Else: |
| @@ -81,29 +81,29 @@ Measured from Sunday before start of Hebrew calendar." | |||
| 81 | ;; Else return. | 81 | ;; Else return. |
| 82 | alternative-day))) | 82 | alternative-day))) |
| 83 | 83 | ||
| 84 | (defun hebrew-calendar-days-in-year (year) | 84 | (defun calendar-hebrew-days-in-year (year) |
| 85 | "Number of days in Hebrew YEAR." | 85 | "Number of days in Hebrew YEAR." |
| 86 | (- (hebrew-calendar-elapsed-days (1+ year)) | 86 | (- (calendar-hebrew-elapsed-days (1+ year)) |
| 87 | (hebrew-calendar-elapsed-days year))) | 87 | (calendar-hebrew-elapsed-days year))) |
| 88 | 88 | ||
| 89 | (defun hebrew-calendar-long-heshvan-p (year) | 89 | (defun calendar-hebrew-long-heshvan-p (year) |
| 90 | "Non-nil if Heshvan is long in Hebrew YEAR." | 90 | "Non-nil if Heshvan is long in Hebrew YEAR." |
| 91 | (= (% (hebrew-calendar-days-in-year year) 10) 5)) | 91 | (= (% (calendar-hebrew-days-in-year year) 10) 5)) |
| 92 | 92 | ||
| 93 | (defun hebrew-calendar-short-kislev-p (year) | 93 | (defun calendar-hebrew-short-kislev-p (year) |
| 94 | "Non-nil if Kislev is short in Hebrew YEAR." | 94 | "Non-nil if Kislev is short in Hebrew YEAR." |
| 95 | (= (% (hebrew-calendar-days-in-year year) 10) 3)) | 95 | (= (% (calendar-hebrew-days-in-year year) 10) 3)) |
| 96 | 96 | ||
| 97 | (defun hebrew-calendar-last-day-of-month (month year) | 97 | (defun calendar-hebrew-last-day-of-month (month year) |
| 98 | "The last day of MONTH in YEAR." | 98 | "The last day of MONTH in YEAR." |
| 99 | (if (or (memq month (list 2 4 6 10 13)) | 99 | (if (or (memq month (list 2 4 6 10 13)) |
| 100 | (and (= month 12) (not (hebrew-calendar-leap-year-p year))) | 100 | (and (= month 12) (not (calendar-hebrew-leap-year-p year))) |
| 101 | (and (= month 8) (not (hebrew-calendar-long-heshvan-p year))) | 101 | (and (= month 8) (not (calendar-hebrew-long-heshvan-p year))) |
| 102 | (and (= month 9) (hebrew-calendar-short-kislev-p year))) | 102 | (and (= month 9) (calendar-hebrew-short-kislev-p year))) |
| 103 | 29 | 103 | 29 |
| 104 | 30)) | 104 | 30)) |
| 105 | 105 | ||
| 106 | (defun calendar-absolute-from-hebrew (date) | 106 | (defun calendar-hebrew-to-absolute (date) |
| 107 | "Absolute date of Hebrew DATE. | 107 | "Absolute date of Hebrew DATE. |
| 108 | The absolute date is the number of days elapsed since the (imaginary) | 108 | The absolute date is the number of days elapsed since the (imaginary) |
| 109 | Gregorian date Sunday, December 31, 1 BC." | 109 | Gregorian date Sunday, December 31, 1 BC." |
| @@ -114,18 +114,21 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 114 | (if (< month 7) ; before Tishri | 114 | (if (< month 7) ; before Tishri |
| 115 | ;; Then add days in prior months this year before and after Nisan. | 115 | ;; Then add days in prior months this year before and after Nisan. |
| 116 | (+ (calendar-sum | 116 | (+ (calendar-sum |
| 117 | m 7 (<= m (hebrew-calendar-last-month-of-year year)) | 117 | m 7 (<= m (calendar-hebrew-last-month-of-year year)) |
| 118 | (hebrew-calendar-last-day-of-month m year)) | 118 | (calendar-hebrew-last-day-of-month m year)) |
| 119 | (calendar-sum | 119 | (calendar-sum |
| 120 | m 1 (< m month) | 120 | m 1 (< m month) |
| 121 | (hebrew-calendar-last-day-of-month m year))) | 121 | (calendar-hebrew-last-day-of-month m year))) |
| 122 | ;; Else add days in prior months this year. | 122 | ;; Else add days in prior months this year. |
| 123 | (calendar-sum | 123 | (calendar-sum |
| 124 | m 7 (< m month) | 124 | m 7 (< m month) |
| 125 | (hebrew-calendar-last-day-of-month m year))) | 125 | (calendar-hebrew-last-day-of-month m year))) |
| 126 | (hebrew-calendar-elapsed-days year) ; days in prior years | 126 | (calendar-hebrew-elapsed-days year) ; days in prior years |
| 127 | -1373429))) ; days elapsed before absolute date 1 | 127 | -1373429))) ; days elapsed before absolute date 1 |
| 128 | 128 | ||
| 129 | (define-obsolete-function-alias 'calendar-absolute-from-hebrew | ||
| 130 | 'calendar-hebrew-to-absolute "23.1") | ||
| 131 | |||
| 129 | (defun calendar-hebrew-from-absolute (date) | 132 | (defun calendar-hebrew-from-absolute (date) |
| 130 | "Compute the Hebrew date (month day year) corresponding to absolute DATE. | 133 | "Compute the Hebrew date (month day year) corresponding to absolute DATE. |
| 131 | The absolute date is the number of days elapsed since the (imaginary) | 134 | The absolute date is the number of days elapsed since the (imaginary) |
| @@ -135,19 +138,19 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 135 | (month (aref [9 10 11 12 1 2 3 4 7 7 7 8] | 138 | (month (aref [9 10 11 12 1 2 3 4 7 7 7 8] |
| 136 | (1- (extract-calendar-month greg-date)))) | 139 | (1- (extract-calendar-month greg-date)))) |
| 137 | (length (progn | 140 | (length (progn |
| 138 | (while (>= date (calendar-absolute-from-hebrew | 141 | (while (>= date (calendar-hebrew-to-absolute |
| 139 | (list 7 1 (1+ year)))) | 142 | (list 7 1 (1+ year)))) |
| 140 | (setq year (1+ year))) | 143 | (setq year (1+ year))) |
| 141 | (hebrew-calendar-last-month-of-year year))) | 144 | (calendar-hebrew-last-month-of-year year))) |
| 142 | day) | 145 | day) |
| 143 | (while (> date | 146 | (while (> date |
| 144 | (calendar-absolute-from-hebrew | 147 | (calendar-hebrew-to-absolute |
| 145 | (list month | 148 | (list month |
| 146 | (hebrew-calendar-last-day-of-month month year) | 149 | (calendar-hebrew-last-day-of-month month year) |
| 147 | year))) | 150 | year))) |
| 148 | (setq month (1+ (% month length)))) | 151 | (setq month (1+ (% month length)))) |
| 149 | (setq day (1+ | 152 | (setq day (1+ |
| 150 | (- date (calendar-absolute-from-hebrew (list month 1 year))))) | 153 | (- date (calendar-hebrew-to-absolute (list month 1 year))))) |
| 151 | (list month day year))) | 154 | (list month day year))) |
| 152 | 155 | ||
| 153 | (defconst calendar-hebrew-month-name-array-common-year | 156 | (defconst calendar-hebrew-month-name-array-common-year |
| @@ -169,19 +172,22 @@ Driven by the variable `calendar-date-display-form'." | |||
| 169 | (calendar-absolute-from-gregorian | 172 | (calendar-absolute-from-gregorian |
| 170 | (or date (calendar-current-date))))) | 173 | (or date (calendar-current-date))))) |
| 171 | (calendar-month-name-array | 174 | (calendar-month-name-array |
| 172 | (if (hebrew-calendar-leap-year-p (extract-calendar-year hebrew-date)) | 175 | (if (calendar-hebrew-leap-year-p (extract-calendar-year hebrew-date)) |
| 173 | calendar-hebrew-month-name-array-leap-year | 176 | calendar-hebrew-month-name-array-leap-year |
| 174 | calendar-hebrew-month-name-array-common-year))) | 177 | calendar-hebrew-month-name-array-common-year))) |
| 175 | (calendar-date-string hebrew-date nil t))) | 178 | (calendar-date-string hebrew-date nil t))) |
| 176 | 179 | ||
| 177 | ;;;###cal-autoload | 180 | ;;;###cal-autoload |
| 178 | (defun calendar-print-hebrew-date () | 181 | (defun calendar-hebrew-print-date () |
| 179 | "Show the Hebrew calendar equivalent of the date under the cursor." | 182 | "Show the Hebrew calendar equivalent of the date under the cursor." |
| 180 | (interactive) | 183 | (interactive) |
| 181 | (message "Hebrew date (until sunset): %s" | 184 | (message "Hebrew date (until sunset): %s" |
| 182 | (calendar-hebrew-date-string (calendar-cursor-to-date t)))) | 185 | (calendar-hebrew-date-string (calendar-cursor-to-date t)))) |
| 183 | 186 | ||
| 184 | (defun hebrew-calendar-yahrzeit (death-date year) | 187 | (define-obsolete-function-alias 'calendar-print-hebrew-date |
| 188 | 'calendar-hebrew-print-date "23.1") | ||
| 189 | |||
| 190 | (defun calendar-hebrew-yahrzeit (death-date year) | ||
| 185 | "Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR." | 191 | "Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR." |
| 186 | (let ((death-day (extract-calendar-day death-date)) | 192 | (let ((death-day (extract-calendar-day death-date)) |
| 187 | (death-month (extract-calendar-month death-date)) | 193 | (death-month (extract-calendar-month death-date)) |
| @@ -191,29 +197,32 @@ Driven by the variable `calendar-date-display-form'." | |||
| 191 | ;; that was not Heshvan 30, use the day before Kislev 1. | 197 | ;; that was not Heshvan 30, use the day before Kislev 1. |
| 192 | ((and (= death-month 8) | 198 | ((and (= death-month 8) |
| 193 | (= death-day 30) | 199 | (= death-day 30) |
| 194 | (not (hebrew-calendar-long-heshvan-p (1+ death-year)))) | 200 | (not (calendar-hebrew-long-heshvan-p (1+ death-year)))) |
| 195 | (1- (calendar-absolute-from-hebrew (list 9 1 year)))) | 201 | (1- (calendar-hebrew-to-absolute (list 9 1 year)))) |
| 196 | ;; If it's Kislev 30 it depends on the first anniversary; if that | 202 | ;; If it's Kislev 30 it depends on the first anniversary; if that |
| 197 | ;; was not Kislev 30, use the day before Teveth 1. | 203 | ;; was not Kislev 30, use the day before Teveth 1. |
| 198 | ((and (= death-month 9) | 204 | ((and (= death-month 9) |
| 199 | (= death-day 30) | 205 | (= death-day 30) |
| 200 | (hebrew-calendar-short-kislev-p (1+ death-year))) | 206 | (calendar-hebrew-short-kislev-p (1+ death-year))) |
| 201 | (1- (calendar-absolute-from-hebrew (list 10 1 year)))) | 207 | (1- (calendar-hebrew-to-absolute (list 10 1 year)))) |
| 202 | ;; If it's Adar II, use the same day in last month of year (Adar | 208 | ;; If it's Adar II, use the same day in last month of year (Adar |
| 203 | ;; or Adar II). | 209 | ;; or Adar II). |
| 204 | ((= death-month 13) | 210 | ((= death-month 13) |
| 205 | (calendar-absolute-from-hebrew | 211 | (calendar-hebrew-to-absolute |
| 206 | (list (hebrew-calendar-last-month-of-year year) death-day year))) | 212 | (list (calendar-hebrew-last-month-of-year year) death-day year))) |
| 207 | ;; If it's the 30th in Adar I and year is not a leap year (so | 213 | ;; If it's the 30th in Adar I and year is not a leap year (so |
| 208 | ;; Adar has only 29 days), use the last day in Shevat. | 214 | ;; Adar has only 29 days), use the last day in Shevat. |
| 209 | ((and (= death-day 30) | 215 | ((and (= death-day 30) |
| 210 | (= death-month 12) | 216 | (= death-month 12) |
| 211 | (not (hebrew-calendar-leap-year-p year))) | 217 | (not (calendar-hebrew-leap-year-p year))) |
| 212 | (calendar-absolute-from-hebrew (list 11 30 year))) | 218 | (calendar-hebrew-to-absolute (list 11 30 year))) |
| 213 | ;; In all other cases, use the normal anniversary of the date of death. | 219 | ;; In all other cases, use the normal anniversary of the date of death. |
| 214 | (t (calendar-absolute-from-hebrew | 220 | (t (calendar-hebrew-to-absolute |
| 215 | (list death-month death-day year)))))) | 221 | (list death-month death-day year)))))) |
| 216 | 222 | ||
| 223 | (define-obsolete-function-alias 'hebrew-calendar-yahrzeit | ||
| 224 | 'calendar-hebrew-yahrzeit "23.1") | ||
| 225 | |||
| 217 | (defun calendar-hebrew-read-date () | 226 | (defun calendar-hebrew-read-date () |
| 218 | "Interactively read the arguments for a Hebrew date command. | 227 | "Interactively read the arguments for a Hebrew date command. |
| 219 | Reads a year, month, and day." | 228 | Reads a year, month, and day." |
| @@ -225,7 +234,7 @@ Reads a year, month, and day." | |||
| 225 | (extract-calendar-year | 234 | (extract-calendar-year |
| 226 | (calendar-hebrew-from-absolute | 235 | (calendar-hebrew-from-absolute |
| 227 | (calendar-absolute-from-gregorian today)))))) | 236 | (calendar-absolute-from-gregorian today)))))) |
| 228 | (month-array (if (hebrew-calendar-leap-year-p year) | 237 | (month-array (if (calendar-hebrew-leap-year-p year) |
| 229 | calendar-hebrew-month-name-array-leap-year | 238 | calendar-hebrew-month-name-array-leap-year |
| 230 | calendar-hebrew-month-name-array-common-year)) | 239 | calendar-hebrew-month-name-array-common-year)) |
| 231 | (completion-ignore-case t) | 240 | (completion-ignore-case t) |
| @@ -241,14 +250,14 @@ Reads a year, month, and day." | |||
| 241 | (calendar-make-alist month-array) | 250 | (calendar-make-alist month-array) |
| 242 | t)))) | 251 | t)))) |
| 243 | (< 0 | 252 | (< 0 |
| 244 | (calendar-absolute-from-hebrew | 253 | (calendar-hebrew-to-absolute |
| 245 | (list m | 254 | (list m |
| 246 | (hebrew-calendar-last-day-of-month | 255 | (calendar-hebrew-last-day-of-month |
| 247 | m year) | 256 | m year) |
| 248 | year)))))) | 257 | year)))))) |
| 249 | t) | 258 | t) |
| 250 | (calendar-make-alist month-array 1) t))) | 259 | (calendar-make-alist month-array 1) t))) |
| 251 | (last (hebrew-calendar-last-day-of-month month year)) | 260 | (last (calendar-hebrew-last-day-of-month month year)) |
| 252 | (first (if (and (= year 3761) (= month 10)) | 261 | (first (if (and (= year 3761) (= month 10)) |
| 253 | 18 1)) | 262 | 18 1)) |
| 254 | (day (calendar-read | 263 | (day (calendar-read |
| @@ -258,12 +267,15 @@ Reads a year, month, and day." | |||
| 258 | (list (list month day year)))) | 267 | (list (list month day year)))) |
| 259 | 268 | ||
| 260 | ;;;###cal-autoload | 269 | ;;;###cal-autoload |
| 261 | (defun calendar-goto-hebrew-date (date &optional noecho) | 270 | (defun calendar-hebrew-goto-date (date &optional noecho) |
| 262 | "Move cursor to Hebrew DATE; echo Hebrew date unless NOECHO is non-nil." | 271 | "Move cursor to Hebrew DATE; echo Hebrew date unless NOECHO is non-nil." |
| 263 | (interactive (calendar-hebrew-read-date)) | 272 | (interactive (calendar-hebrew-read-date)) |
| 264 | (calendar-goto-date (calendar-gregorian-from-absolute | 273 | (calendar-goto-date (calendar-gregorian-from-absolute |
| 265 | (calendar-absolute-from-hebrew date))) | 274 | (calendar-hebrew-to-absolute date))) |
| 266 | (or noecho (calendar-print-hebrew-date))) | 275 | (or noecho (calendar-hebrew-print-date))) |
| 276 | |||
| 277 | (define-obsolete-function-alias 'calendar-goto-hebrew-date | ||
| 278 | 'calendar-hebrew-goto-date "23.1") | ||
| 267 | 279 | ||
| 268 | (defvar displayed-month) ; from generate-calendar | 280 | (defvar displayed-month) ; from generate-calendar |
| 269 | 281 | ||
| @@ -302,7 +314,7 @@ Returns the corresponding Gregorian date." | |||
| 302 | (if (< 8 month) (- month 8) (+ month 4)) | 314 | (if (< 8 month) (- month 8) (+ month 4)) |
| 303 | (if (< 7 month) (- month 7) (+ month 5)))) | 315 | (if (< 7 month) (- month 7) (+ month 5)))) |
| 304 | (calendar-nongregorian-visible-p | 316 | (calendar-nongregorian-visible-p |
| 305 | month day 'calendar-absolute-from-hebrew | 317 | month day 'calendar-hebrew-to-absolute |
| 306 | 'calendar-hebrew-from-absolute | 318 | 'calendar-hebrew-from-absolute |
| 307 | ;; Hebrew new year is start of month 7. | 319 | ;; Hebrew new year is start of month 7. |
| 308 | ;; If hmonth >= 7, choose the higher year. | 320 | ;; If hmonth >= 7, choose the higher year. |
| @@ -323,12 +335,12 @@ nil if it is not visible in the current calendar window." | |||
| 323 | (defvar displayed-year) | 335 | (defvar displayed-year) |
| 324 | 336 | ||
| 325 | ;;;###holiday-autoload | 337 | ;;;###holiday-autoload |
| 326 | (defun holiday-rosh-hashanah-etc (&optional all) | 338 | (defun holiday-hebrew-rosh-hashanah (&optional all) |
| 327 | "List of dates related to Rosh Hashanah, as visible in calendar window. | 339 | "List of dates related to Rosh Hashanah, as visible in calendar window. |
| 328 | Shows only the major holidays, unless `calendar-hebrew-all-holidays-flag' | 340 | Shows only the major holidays, unless `calendar-hebrew-all-holidays-flag' |
| 329 | or ALL is non-nil." | 341 | or ALL is non-nil." |
| 330 | (when (memq displayed-month '(8 9 10 11)) | 342 | (when (memq displayed-month '(8 9 10 11)) |
| 331 | (let ((abs-r-h (calendar-absolute-from-hebrew | 343 | (let ((abs-r-h (calendar-hebrew-to-absolute |
| 332 | (list 7 1 (+ displayed-year 3761))))) | 344 | (list 7 1 (+ displayed-year 3761))))) |
| 333 | (holiday-filter-visible-calendar | 345 | (holiday-filter-visible-calendar |
| 334 | (append | 346 | (append |
| @@ -376,7 +388,11 @@ or ALL is non-nil." | |||
| 376 | "Hoshanah Rabbah")))))))) | 388 | "Hoshanah Rabbah")))))))) |
| 377 | 389 | ||
| 378 | ;;;###holiday-autoload | 390 | ;;;###holiday-autoload |
| 379 | (defun holiday-hanukkah (&optional all) | 391 | (define-obsolete-function-alias 'holiday-rosh-hashanah-etc |
| 392 | 'holiday-hebrew-rosh-hashanah "23.1") | ||
| 393 | |||
| 394 | ;;;###holiday-autoload | ||
| 395 | (defun holiday-hebrew-hanukkah (&optional all) | ||
| 380 | "List of dates related to Hanukkah, as visible in calendar window. | 396 | "List of dates related to Hanukkah, as visible in calendar window. |
| 381 | Shows only Hanukkah, unless `calendar-hebrew-all-holidays-flag' or ALL | 397 | Shows only Hanukkah, unless `calendar-hebrew-all-holidays-flag' or ALL |
| 382 | is non-nil." | 398 | is non-nil." |
| @@ -390,7 +406,7 @@ is non-nil." | |||
| 390 | (calendar-hebrew-from-absolute | 406 | (calendar-hebrew-from-absolute |
| 391 | (calendar-absolute-from-gregorian | 407 | (calendar-absolute-from-gregorian |
| 392 | (list m (calendar-last-day-of-month m y) y)))))) | 408 | (list m (calendar-last-day-of-month m y) y)))))) |
| 393 | (abs-h (calendar-absolute-from-hebrew (list 9 25 h-y))) | 409 | (abs-h (calendar-hebrew-to-absolute (list 9 25 h-y))) |
| 394 | (ord ["first" "second" "third" "fourth" "fifth" "sixth" | 410 | (ord ["first" "second" "third" "fourth" "fifth" "sixth" |
| 395 | "seventh" "eighth"]) | 411 | "seventh" "eighth"]) |
| 396 | han) | 412 | han) |
| @@ -408,12 +424,16 @@ is non-nil." | |||
| 408 | (list (list (calendar-gregorian-from-absolute abs-h) "Hanukkah"))))))) | 424 | (list (list (calendar-gregorian-from-absolute abs-h) "Hanukkah"))))))) |
| 409 | 425 | ||
| 410 | ;;;###holiday-autoload | 426 | ;;;###holiday-autoload |
| 411 | (defun holiday-passover-etc (&optional all) | 427 | (define-obsolete-function-alias 'holiday-hanukkah |
| 428 | 'holiday-hebrew-hanukkah "23.1") | ||
| 429 | |||
| 430 | ;;;###holiday-autoload | ||
| 431 | (defun holiday-hebrew-passover (&optional all) | ||
| 412 | "List of dates related to Passover, as visible in calendar window. | 432 | "List of dates related to Passover, as visible in calendar window. |
| 413 | Shows only the major holidays, unless `calendar-hebrew-all-holidays-flag' | 433 | Shows only the major holidays, unless `calendar-hebrew-all-holidays-flag' |
| 414 | or ALL is non-nil." | 434 | or ALL is non-nil." |
| 415 | (when (< displayed-month 8) | 435 | (when (< displayed-month 8) |
| 416 | (let ((abs-p (calendar-absolute-from-hebrew | 436 | (let ((abs-p (calendar-hebrew-to-absolute |
| 417 | (list 1 15 (+ displayed-year 3760))))) | 437 | (list 1 15 (+ displayed-year 3760))))) |
| 418 | (holiday-filter-visible-calendar | 438 | (holiday-filter-visible-calendar |
| 419 | ;; The first two are out of order when the others are added. | 439 | ;; The first two are out of order when the others are added. |
| @@ -487,10 +507,14 @@ or ALL is non-nil." | |||
| 487 | "Shavuot (second day)")))))))) | 507 | "Shavuot (second day)")))))))) |
| 488 | 508 | ||
| 489 | ;;;###holiday-autoload | 509 | ;;;###holiday-autoload |
| 490 | (defun holiday-tisha-b-av-etc () | 510 | (define-obsolete-function-alias 'holiday-passover-etc |
| 511 | 'holiday-hebrew-passover "23.1") | ||
| 512 | |||
| 513 | ;;;###holiday-autoload | ||
| 514 | (defun holiday-hebrew-tisha-b-av () | ||
| 491 | "List of dates around Tisha B'Av, as visible in calendar window." | 515 | "List of dates around Tisha B'Av, as visible in calendar window." |
| 492 | (when (memq displayed-month '(5 6 7 8 9)) | 516 | (when (memq displayed-month '(5 6 7 8 9)) |
| 493 | (let ((abs-t-a (calendar-absolute-from-hebrew | 517 | (let ((abs-t-a (calendar-hebrew-to-absolute |
| 494 | (list 5 9 (+ displayed-year 3760))))) | 518 | (list 5 9 (+ displayed-year 3760))))) |
| 495 | (holiday-filter-visible-calendar | 519 | (holiday-filter-visible-calendar |
| 496 | (list | 520 | (list |
| @@ -507,6 +531,10 @@ or ALL is non-nil." | |||
| 507 | (calendar-dayname-on-or-before 6 (+ abs-t-a 7))) | 531 | (calendar-dayname-on-or-before 6 (+ abs-t-a 7))) |
| 508 | "Shabbat Nahamu")))))) | 532 | "Shabbat Nahamu")))))) |
| 509 | 533 | ||
| 534 | ;;;###holiday-autoload | ||
| 535 | (define-obsolete-function-alias 'holiday-tisha-b-av-etc | ||
| 536 | 'holiday-hebrew-tisha-b-av "23.1") | ||
| 537 | |||
| 510 | (autoload 'holiday-julian "cal-julian") | 538 | (autoload 'holiday-julian "cal-julian") |
| 511 | 539 | ||
| 512 | ;;;###holiday-autoload | 540 | ;;;###holiday-autoload |
| @@ -535,7 +563,7 @@ Kiddush HaHamah." | |||
| 535 | (calendar-hebrew-from-absolute | 563 | (calendar-hebrew-from-absolute |
| 536 | (calendar-absolute-from-gregorian | 564 | (calendar-absolute-from-gregorian |
| 537 | (list displayed-month 28 displayed-year))))) | 565 | (list displayed-month 28 displayed-year))))) |
| 538 | (if (= 6 (% (calendar-absolute-from-hebrew (list 10 10 h-year)) | 566 | (if (= 6 (% (calendar-hebrew-to-absolute (list 10 10 h-year)) |
| 539 | 7)) | 567 | 7)) |
| 540 | 11 10)) | 568 | 11 10)) |
| 541 | "Tzom Teveth") | 569 | "Tzom Teveth") |
| @@ -554,14 +582,14 @@ Kiddush HaHamah." | |||
| 554 | s-s | 582 | s-s |
| 555 | (calendar-hebrew-from-absolute | 583 | (calendar-hebrew-from-absolute |
| 556 | (if (= 6 | 584 | (if (= 6 |
| 557 | (% (calendar-absolute-from-hebrew | 585 | (% (calendar-hebrew-to-absolute |
| 558 | (list 7 1 h-year)) | 586 | (list 7 1 h-year)) |
| 559 | 7)) | 587 | 7)) |
| 560 | (calendar-dayname-on-or-before | 588 | (calendar-dayname-on-or-before |
| 561 | 6 (calendar-absolute-from-hebrew | 589 | 6 (calendar-hebrew-to-absolute |
| 562 | (list 11 17 h-year))) | 590 | (list 11 17 h-year))) |
| 563 | (calendar-dayname-on-or-before | 591 | (calendar-dayname-on-or-before |
| 564 | 6 (calendar-absolute-from-hebrew | 592 | 6 (calendar-hebrew-to-absolute |
| 565 | (list 11 16 h-year)))))) | 593 | (list 11 16 h-year)))))) |
| 566 | (extract-calendar-day s-s)) | 594 | (extract-calendar-day s-s)) |
| 567 | "Shabbat Shirah") | 595 | "Shabbat Shirah") |
| @@ -580,7 +608,7 @@ Kiddush HaHamah." | |||
| 580 | (autoload 'diary-list-entries-1 "diary-lib") | 608 | (autoload 'diary-list-entries-1 "diary-lib") |
| 581 | 609 | ||
| 582 | ;;;###diary-autoload | 610 | ;;;###diary-autoload |
| 583 | (defun list-hebrew-diary-entries () | 611 | (defun diary-hebrew-list-entries () |
| 584 | "Add any Hebrew date entries from the diary file to `diary-entries-list'. | 612 | "Add any Hebrew date entries from the diary file to `diary-entries-list'. |
| 585 | Hebrew date diary entries must be prefaced by `diary-hebrew-entry-symbol' | 613 | Hebrew date diary entries must be prefaced by `diary-hebrew-entry-symbol' |
| 586 | \(normally an `H'). The same diary date forms govern the style | 614 | \(normally an `H'). The same diary date forms govern the style |
| @@ -595,11 +623,14 @@ is provided for use with `nongregorian-diary-listing-hook'." | |||
| 595 | (diary-list-entries-1 calendar-hebrew-month-name-array-leap-year | 623 | (diary-list-entries-1 calendar-hebrew-month-name-array-leap-year |
| 596 | diary-hebrew-entry-symbol | 624 | diary-hebrew-entry-symbol |
| 597 | 'calendar-hebrew-from-absolute)) | 625 | 'calendar-hebrew-from-absolute)) |
| 626 | ;;;###diary-autoload | ||
| 627 | (define-obsolete-function-alias 'list-hebrew-diary-entries | ||
| 628 | 'diary-hebrew-list-entries "23.1") | ||
| 598 | 629 | ||
| 599 | (autoload 'calendar-mark-complex "diary-lib") | 630 | (autoload 'calendar-mark-complex "diary-lib") |
| 600 | 631 | ||
| 601 | ;;;###diary-autoload | 632 | ;;;###diary-autoload |
| 602 | (defun mark-hebrew-calendar-date-pattern (month day year &optional color) | 633 | (defun calendar-hebrew-mark-date-pattern (month day year &optional color) |
| 603 | "Mark dates in calendar window that conform to Hebrew date MONTH/DAY/YEAR. | 634 | "Mark dates in calendar window that conform to Hebrew date MONTH/DAY/YEAR. |
| 604 | A value of 0 in any position is a wildcard. Optional argument COLOR is | 635 | A value of 0 in any position is a wildcard. Optional argument COLOR is |
| 605 | passed to `mark-visible-calendar-date' as MARK." | 636 | passed to `mark-visible-calendar-date' as MARK." |
| @@ -611,7 +642,7 @@ passed to `mark-visible-calendar-date' as MARK." | |||
| 611 | (if (not (zerop year)) | 642 | (if (not (zerop year)) |
| 612 | ;; Fully specified Hebrew date. | 643 | ;; Fully specified Hebrew date. |
| 613 | (let ((date (calendar-gregorian-from-absolute | 644 | (let ((date (calendar-gregorian-from-absolute |
| 614 | (calendar-absolute-from-hebrew | 645 | (calendar-hebrew-to-absolute |
| 615 | (list month day year))))) | 646 | (list month day year))))) |
| 616 | (if (calendar-date-is-visible-p date) | 647 | (if (calendar-date-is-visible-p date) |
| 617 | (mark-visible-calendar-date date color))) | 648 | (mark-visible-calendar-date date color))) |
| @@ -621,33 +652,43 @@ passed to `mark-visible-calendar-date' as MARK." | |||
| 621 | (calendar-mark-complex month day year | 652 | (calendar-mark-complex month day year |
| 622 | 'calendar-hebrew-from-absolute color)))) | 653 | 'calendar-hebrew-from-absolute color)))) |
| 623 | 654 | ||
| 655 | ;;;###diary-autoload | ||
| 656 | (define-obsolete-function-alias 'mark-hebrew-calendar-date-pattern | ||
| 657 | 'calendar-hebrew-mark-date-pattern "23.1") | ||
| 658 | |||
| 624 | (autoload 'diary-mark-entries-1 "diary-lib") | 659 | (autoload 'diary-mark-entries-1 "diary-lib") |
| 625 | 660 | ||
| 626 | ;;;###diary-autoload | 661 | ;;;###diary-autoload |
| 627 | (defun mark-hebrew-diary-entries () | 662 | (defun diary-hebrew-mark-entries () |
| 628 | "Mark days in the calendar window that have Hebrew date diary entries. | 663 | "Mark days in the calendar window that have Hebrew date diary entries. |
| 629 | Marks each entry in `diary-file' (or included files) visible in the calendar | 664 | Marks each entry in `diary-file' (or included files) visible in the calendar |
| 630 | window. See `list-hebrew-diary-entries' for more information." | 665 | window. See `list-hebrew-diary-entries' for more information." |
| 631 | (diary-mark-entries-1 'mark-hebrew-calendar-date-pattern | 666 | (diary-mark-entries-1 'calendar-hebrew-mark-date-pattern |
| 632 | calendar-hebrew-month-name-array-leap-year | 667 | calendar-hebrew-month-name-array-leap-year |
| 633 | diary-hebrew-entry-symbol | 668 | diary-hebrew-entry-symbol |
| 634 | 'calendar-hebrew-from-absolute)) | 669 | 'calendar-hebrew-from-absolute)) |
| 635 | 670 | ||
| 671 | ;;;###diary-autoload | ||
| 672 | (define-obsolete-function-alias 'mark-hebrew-diary-entries | ||
| 673 | 'diary-hebrew-mark-entries "23.1") | ||
| 636 | 674 | ||
| 637 | (autoload 'diary-insert-entry-1 "diary-lib") | 675 | (autoload 'diary-insert-entry-1 "diary-lib") |
| 638 | 676 | ||
| 639 | ;;;###cal-autoload | 677 | ;;;###cal-autoload |
| 640 | (defun insert-hebrew-diary-entry (arg) | 678 | (defun diary-hebrew-insert-entry (arg) |
| 641 | "Insert a diary entry. | 679 | "Insert a diary entry for the Hebrew date at point. |
| 642 | For the Hebrew date corresponding to the date indicated by point. | ||
| 643 | Prefix argument ARG makes the entry nonmarking." | 680 | Prefix argument ARG makes the entry nonmarking." |
| 644 | (interactive "P") | 681 | (interactive "P") |
| 645 | (diary-insert-entry-1 nil arg calendar-hebrew-month-name-array-leap-year | 682 | (diary-insert-entry-1 nil arg calendar-hebrew-month-name-array-leap-year |
| 646 | diary-hebrew-entry-symbol | 683 | diary-hebrew-entry-symbol |
| 647 | 'calendar-hebrew-from-absolute)) | 684 | 'calendar-hebrew-from-absolute)) |
| 648 | 685 | ||
| 686 | ;;;###diary-autoload | ||
| 687 | (define-obsolete-function-alias 'insert-hebrew-diary-entry | ||
| 688 | 'diary-hebrew-insert-entry "23.1") | ||
| 689 | |||
| 649 | ;;;###cal-autoload | 690 | ;;;###cal-autoload |
| 650 | (defun insert-monthly-hebrew-diary-entry (arg) | 691 | (defun diary-hebrew-insert-monthly-entry (arg) |
| 651 | "Insert a monthly diary entry. | 692 | "Insert a monthly diary entry. |
| 652 | For the day of the Hebrew month corresponding to the date indicated by point. | 693 | For the day of the Hebrew month corresponding to the date indicated by point. |
| 653 | Prefix argument ARG makes the entry nonmarking." | 694 | Prefix argument ARG makes the entry nonmarking." |
| @@ -655,9 +696,12 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 655 | (diary-insert-entry-1 'monthly arg calendar-hebrew-month-name-array-leap-year | 696 | (diary-insert-entry-1 'monthly arg calendar-hebrew-month-name-array-leap-year |
| 656 | diary-hebrew-entry-symbol | 697 | diary-hebrew-entry-symbol |
| 657 | 'calendar-hebrew-from-absolute)) | 698 | 'calendar-hebrew-from-absolute)) |
| 699 | ;;;###diary-autoload | ||
| 700 | (define-obsolete-function-alias 'insert-monthly-hebrew-diary-entry | ||
| 701 | 'diary-hebrew-insert-monthly-entry "23.1") | ||
| 658 | 702 | ||
| 659 | ;;;###cal-autoload | 703 | ;;;###cal-autoload |
| 660 | (defun insert-yearly-hebrew-diary-entry (arg) | 704 | (defun diary-hebrew-insert-yearly-entry (arg) |
| 661 | "Insert an annual diary entry. | 705 | "Insert an annual diary entry. |
| 662 | For the day of the Hebrew year corresponding to the date indicated by point. | 706 | For the day of the Hebrew year corresponding to the date indicated by point. |
| 663 | Prefix argument ARG makes the entry nonmarking." | 707 | Prefix argument ARG makes the entry nonmarking." |
| @@ -665,9 +709,12 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 665 | (diary-insert-entry-1 'yearly arg calendar-hebrew-month-name-array-leap-year | 709 | (diary-insert-entry-1 'yearly arg calendar-hebrew-month-name-array-leap-year |
| 666 | diary-hebrew-entry-symbol | 710 | diary-hebrew-entry-symbol |
| 667 | 'calendar-hebrew-from-absolute)) | 711 | 'calendar-hebrew-from-absolute)) |
| 712 | ;;;###diary-autoload | ||
| 713 | (define-obsolete-function-alias 'insert-yearly-hebrew-diary-entry | ||
| 714 | 'diary-hebrew-insert-yearly-entry "23.1") | ||
| 668 | 715 | ||
| 669 | ;;;###autoload | 716 | ;;;###autoload |
| 670 | (defun list-yahrzeit-dates (death-date start-year end-year) | 717 | (defun calender-hebrew-list-yahrzeits (death-date start-year end-year) |
| 671 | "List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR. | 718 | "List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR. |
| 672 | When called interactively from the calendar window, the date of death is taken | 719 | When called interactively from the calendar window, the date of death is taken |
| 673 | from the cursor position." | 720 | from the cursor position." |
| @@ -716,7 +763,7 @@ from the cursor position." | |||
| 716 | (format "Yahrzeit dates for %s = %s" | 763 | (format "Yahrzeit dates for %s = %s" |
| 717 | (calendar-date-string death-date) | 764 | (calendar-date-string death-date) |
| 718 | (let ((calendar-month-name-array | 765 | (let ((calendar-month-name-array |
| 719 | (if (hebrew-calendar-leap-year-p h-year) | 766 | (if (calendar-hebrew-leap-year-p h-year) |
| 720 | calendar-hebrew-month-name-array-leap-year | 767 | calendar-hebrew-month-name-array-leap-year |
| 721 | calendar-hebrew-month-name-array-common-year))) | 768 | calendar-hebrew-month-name-array-common-year))) |
| 722 | (calendar-date-string h-date nil t)))) | 769 | (calendar-date-string h-date nil t)))) |
| @@ -724,13 +771,17 @@ from the cursor position." | |||
| 724 | (insert | 771 | (insert |
| 725 | (calendar-date-string | 772 | (calendar-date-string |
| 726 | (calendar-gregorian-from-absolute | 773 | (calendar-gregorian-from-absolute |
| 727 | (hebrew-calendar-yahrzeit | 774 | (calendar-hebrew-yahrzeit |
| 728 | h-date | 775 | h-date |
| 729 | (extract-calendar-year | 776 | (extract-calendar-year |
| 730 | (calendar-hebrew-from-absolute | 777 | (calendar-hebrew-from-absolute |
| 731 | (calendar-absolute-from-gregorian (list 1 1 i))))))) "\n")))) | 778 | (calendar-absolute-from-gregorian (list 1 1 i))))))) "\n")))) |
| 732 | (message "Computing Yahrzeits...done")) | 779 | (message "Computing Yahrzeits...done")) |
| 733 | 780 | ||
| 781 | ;;;###autoload | ||
| 782 | (define-obsolete-function-alias 'list-yahrzeit-dates | ||
| 783 | 'calender-hebrew-list-yahrzeits "23.1") | ||
| 784 | |||
| 734 | (defvar date) | 785 | (defvar date) |
| 735 | 786 | ||
| 736 | ;; To be called from list-sexp-diary-entries, where DATE is bound. | 787 | ;; To be called from list-sexp-diary-entries, where DATE is bound. |
| @@ -740,14 +791,14 @@ from the cursor position." | |||
| 740 | (format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date))) | 791 | (format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date))) |
| 741 | 792 | ||
| 742 | ;;;###diary-autoload | 793 | ;;;###diary-autoload |
| 743 | (defun diary-omer (&optional mark) | 794 | (defun diary-hebrew-omer (&optional mark) |
| 744 | "Omer count diary entry. | 795 | "Omer count diary entry. |
| 745 | Entry applies if date is within 50 days after Passover. | 796 | Entry applies if date is within 50 days after Passover. |
| 746 | 797 | ||
| 747 | An optional parameter MARK specifies a face or single-character string to | 798 | An optional parameter MARK specifies a face or single-character string to |
| 748 | use when highlighting the day in the calendar." | 799 | use when highlighting the day in the calendar." |
| 749 | (let* ((passover | 800 | (let* ((passover |
| 750 | (calendar-absolute-from-hebrew | 801 | (calendar-hebrew-to-absolute |
| 751 | (list 1 15 (+ (extract-calendar-year date) 3760)))) | 802 | (list 1 15 (+ (extract-calendar-year date) 3760)))) |
| 752 | (omer (- (calendar-absolute-from-gregorian date) passover)) | 803 | (omer (- (calendar-absolute-from-gregorian date) passover)) |
| 753 | (week (/ omer 7)) | 804 | (week (/ omer 7)) |
| @@ -765,13 +816,15 @@ use when highlighting the day in the calendar." | |||
| 765 | "" | 816 | "" |
| 766 | (format " and %d day%s" | 817 | (format " and %d day%s" |
| 767 | day (if (= day 1) "" "s")))))))))) | 818 | day (if (= day 1) "" "s")))))))))) |
| 819 | ;;;###diary-autoload | ||
| 820 | (define-obsolete-function-alias 'diary-omer 'diary-hebrew-omer "23.1") | ||
| 768 | 821 | ||
| 769 | (defvar entry) | 822 | (defvar entry) |
| 770 | 823 | ||
| 771 | (autoload 'diary-make-date "diary-lib") | 824 | (autoload 'diary-make-date "diary-lib") |
| 772 | 825 | ||
| 773 | ;;;###diary-autoload | 826 | ;;;###diary-autoload |
| 774 | (defun diary-yahrzeit (death-month death-day death-year &optional mark) | 827 | (defun diary-hebrew-yahrzeit (death-month death-day death-year &optional mark) |
| 775 | "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before. | 828 | "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before. |
| 776 | Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary | 829 | Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary |
| 777 | entry is assumed to be the name of the person. Although the date | 830 | entry is assumed to be the name of the person. Although the date |
| @@ -792,7 +845,7 @@ use when highlighting the day in the calendar." | |||
| 792 | (d (calendar-absolute-from-gregorian date)) | 845 | (d (calendar-absolute-from-gregorian date)) |
| 793 | (yr (extract-calendar-year (calendar-hebrew-from-absolute d))) | 846 | (yr (extract-calendar-year (calendar-hebrew-from-absolute d))) |
| 794 | (diff (- yr h-year)) | 847 | (diff (- yr h-year)) |
| 795 | (y (hebrew-calendar-yahrzeit h-date yr))) | 848 | (y (calendar-hebrew-yahrzeit h-date yr))) |
| 796 | (if (and (> diff 0) (or (= y d) (= y (1+ d)))) | 849 | (if (and (> diff 0) (or (= y d) (= y (1+ d)))) |
| 797 | (cons mark | 850 | (cons mark |
| 798 | (format "Yahrzeit of %s%s: %d%s anniversary" | 851 | (format "Yahrzeit of %s%s: %d%s anniversary" |
| @@ -803,9 +856,11 @@ use when highlighting the day in the calendar." | |||
| 803 | ((= (% diff 10) 2) "nd") | 856 | ((= (% diff 10) 2) "nd") |
| 804 | ((= (% diff 10) 3) "rd") | 857 | ((= (% diff 10) 3) "rd") |
| 805 | (t "th"))))))) | 858 | (t "th"))))))) |
| 859 | ;;;###diary-autoload | ||
| 860 | (define-obsolete-function-alias 'diary-yahrzeit 'diary-hebrew-yahrzeit "23.1") | ||
| 806 | 861 | ||
| 807 | ;;;###diary-autoload | 862 | ;;;###diary-autoload |
| 808 | (defun diary-rosh-hodesh (&optional mark) | 863 | (defun diary-hebrew-rosh-hodesh (&optional mark) |
| 809 | "Rosh Hodesh diary entry. | 864 | "Rosh Hodesh diary entry. |
| 810 | Entry applies if date is Rosh Hodesh, the day before, or the Saturday before. | 865 | Entry applies if date is Rosh Hodesh, the day before, or the Saturday before. |
| 811 | 866 | ||
| @@ -816,8 +871,8 @@ use when highlighting the day in the calendar." | |||
| 816 | (h-month (extract-calendar-month h-date)) | 871 | (h-month (extract-calendar-month h-date)) |
| 817 | (h-day (extract-calendar-day h-date)) | 872 | (h-day (extract-calendar-day h-date)) |
| 818 | (h-year (extract-calendar-year h-date)) | 873 | (h-year (extract-calendar-year h-date)) |
| 819 | (leap-year (hebrew-calendar-leap-year-p h-year)) | 874 | (leap-year (calendar-hebrew-leap-year-p h-year)) |
| 820 | (last-day (hebrew-calendar-last-day-of-month h-month h-year)) | 875 | (last-day (calendar-hebrew-last-day-of-month h-month h-year)) |
| 821 | (h-month-names | 876 | (h-month-names |
| 822 | (if leap-year | 877 | (if leap-year |
| 823 | calendar-hebrew-month-name-array-leap-year | 878 | calendar-hebrew-month-name-array-leap-year |
| @@ -845,7 +900,7 @@ use when highlighting the day in the calendar." | |||
| 845 | (format "Mevarchim Rosh Hodesh %s (%s)" | 900 | (format "Mevarchim Rosh Hodesh %s (%s)" |
| 846 | (aref h-month-names | 901 | (aref h-month-names |
| 847 | (if (= h-month | 902 | (if (= h-month |
| 848 | (hebrew-calendar-last-month-of-year | 903 | (calendar-hebrew-last-month-of-year |
| 849 | h-year)) | 904 | h-year)) |
| 850 | 0 h-month)) | 905 | 0 h-month)) |
| 851 | (aref calendar-day-name-array (- 29 h-day)))) | 906 | (aref calendar-day-name-array (- 29 h-day)))) |
| @@ -862,11 +917,14 @@ use when highlighting the day in the calendar." | |||
| 862 | (format "Erev Rosh Hodesh %s" | 917 | (format "Erev Rosh Hodesh %s" |
| 863 | (aref h-month-names | 918 | (aref h-month-names |
| 864 | (if (= h-month | 919 | (if (= h-month |
| 865 | (hebrew-calendar-last-month-of-year | 920 | (calendar-hebrew-last-month-of-year |
| 866 | h-year)) | 921 | h-year)) |
| 867 | 0 h-month))))))))) | 922 | 0 h-month))))))))) |
| 923 | ;;;###diary-autoload | ||
| 924 | (define-obsolete-function-alias 'diary-rosh-hodesh | ||
| 925 | 'diary-hebrew-rosh-hodesh "23.1") | ||
| 868 | 926 | ||
| 869 | (defconst hebrew-calendar-parashiot-names | 927 | (defconst calendar-hebrew-parashiot-names |
| 870 | ["Bereshith" "Noah" "Lech L'cha" "Vayera" "Hayei Sarah" "Toledoth" | 928 | ["Bereshith" "Noah" "Lech L'cha" "Vayera" "Hayei Sarah" "Toledoth" |
| 871 | "Vayetze" "Vayishlah" "Vayeshev" "Mikketz" "Vayiggash" "Vayhi" | 929 | "Vayetze" "Vayishlah" "Vayeshev" "Mikketz" "Vayiggash" "Vayhi" |
| 872 | "Shemoth" "Vaera" "Bo" "Beshallah" "Yithro" "Mishpatim" | 930 | "Shemoth" "Vaera" "Bo" "Beshallah" "Yithro" "Mishpatim" |
| @@ -878,18 +936,18 @@ use when highlighting the day in the calendar." | |||
| 878 | "Ki Tetze" "Ki Tavo" "Nitzavim" "Vayelech" "Haazinu"] | 936 | "Ki Tetze" "Ki Tavo" "Nitzavim" "Vayelech" "Haazinu"] |
| 879 | "The names of the parashiot in the Torah.") | 937 | "The names of the parashiot in the Torah.") |
| 880 | 938 | ||
| 881 | (defun hebrew-calendar-parasha-name (p) | 939 | (defun calendar-hebrew-parasha-name (p) |
| 882 | "Name(s) corresponding to parasha P." | 940 | "Name(s) corresponding to parasha P." |
| 883 | (if (arrayp p) ; combined parasha | 941 | (if (arrayp p) ; combined parasha |
| 884 | (format "%s/%s" | 942 | (format "%s/%s" |
| 885 | (aref hebrew-calendar-parashiot-names (aref p 0)) | 943 | (aref calendar-hebrew-parashiot-names (aref p 0)) |
| 886 | (aref hebrew-calendar-parashiot-names (aref p 1))) | 944 | (aref calendar-hebrew-parashiot-names (aref p 1))) |
| 887 | (aref hebrew-calendar-parashiot-names p))) | 945 | (aref calendar-hebrew-parashiot-names p))) |
| 888 | 946 | ||
| 889 | ;; Following 14 constants are used in diary-parasha (intern). | 947 | ;; Following 14 constants are used in diary-parasha (intern). |
| 890 | 948 | ||
| 891 | ;; The seven ordinary year types (keviot). | 949 | ;; The seven ordinary year types (keviot). |
| 892 | (defconst hebrew-calendar-year-Saturday-incomplete-Sunday | 950 | (defconst calendar-hebrew-year-Saturday-incomplete-Sunday |
| 893 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] | 951 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] |
| 894 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] | 952 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] |
| 895 | 43 44 45 46 47 48 49 50] | 953 | 43 44 45 46 47 48 49 50] |
| @@ -897,7 +955,7 @@ use when highlighting the day in the calendar." | |||
| 897 | Hebrew year starts on Saturday, is `incomplete' (Heshvan and Kislev each have | 955 | Hebrew year starts on Saturday, is `incomplete' (Heshvan and Kislev each have |
| 898 | 29 days), and has Passover start on Sunday.") | 956 | 29 days), and has Passover start on Sunday.") |
| 899 | 957 | ||
| 900 | (defconst hebrew-calendar-year-Saturday-complete-Tuesday | 958 | (defconst calendar-hebrew-year-Saturday-complete-Tuesday |
| 901 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] | 959 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] |
| 902 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] | 960 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] |
| 903 | 43 44 45 46 47 48 49 [50 51]] | 961 | 43 44 45 46 47 48 49 [50 51]] |
| @@ -905,7 +963,7 @@ Hebrew year starts on Saturday, is `incomplete' (Heshvan and Kislev each have | |||
| 905 | Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each | 963 | Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each |
| 906 | have 30 days), and has Passover start on Tuesday.") | 964 | have 30 days), and has Passover start on Tuesday.") |
| 907 | 965 | ||
| 908 | (defconst hebrew-calendar-year-Monday-incomplete-Tuesday | 966 | (defconst calendar-hebrew-year-Monday-incomplete-Tuesday |
| 909 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] | 967 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] |
| 910 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] | 968 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] |
| 911 | 43 44 45 46 47 48 49 [50 51]] | 969 | 43 44 45 46 47 48 49 [50 51]] |
| @@ -913,7 +971,7 @@ have 30 days), and has Passover start on Tuesday.") | |||
| 913 | Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each | 971 | Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each |
| 914 | have 29 days), and has Passover start on Tuesday.") | 972 | have 29 days), and has Passover start on Tuesday.") |
| 915 | 973 | ||
| 916 | (defconst hebrew-calendar-year-Monday-complete-Thursday | 974 | (defconst calendar-hebrew-year-Monday-complete-Thursday |
| 917 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] | 975 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] |
| 918 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) | 976 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) |
| 919 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] | 977 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] |
| @@ -921,7 +979,7 @@ have 29 days), and has Passover start on Tuesday.") | |||
| 921 | Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have | 979 | Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have |
| 922 | 30 days), and has Passover start on Thursday.") | 980 | 30 days), and has Passover start on Thursday.") |
| 923 | 981 | ||
| 924 | (defconst hebrew-calendar-year-Tuesday-regular-Thursday | 982 | (defconst calendar-hebrew-year-Tuesday-regular-Thursday |
| 925 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] | 983 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] |
| 926 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) | 984 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) |
| 927 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] | 985 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] |
| @@ -929,7 +987,7 @@ Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have | |||
| 929 | Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and | 987 | Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and |
| 930 | Kislev has 30 days), and has Passover start on Thursday.") | 988 | Kislev has 30 days), and has Passover start on Thursday.") |
| 931 | 989 | ||
| 932 | (defconst hebrew-calendar-year-Thursday-regular-Saturday | 990 | (defconst calendar-hebrew-year-Thursday-regular-Saturday |
| 933 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 | 991 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 |
| 934 | 24 nil (nil . 25) (25 . [26 27]) ([26 27] . [28 29]) ([28 29] . 30) | 992 | 24 nil (nil . 25) (25 . [26 27]) ([26 27] . [28 29]) ([28 29] . 30) |
| 935 | (30 . 31) ([31 32] . 32) 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 | 993 | (30 . 31) ([31 32] . 32) 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 |
| @@ -938,7 +996,7 @@ Kislev has 30 days), and has Passover start on Thursday.") | |||
| 938 | Hebrew year that starts on Thursday, is `regular' (Heshvan has 29 days and | 996 | Hebrew year that starts on Thursday, is `regular' (Heshvan has 29 days and |
| 939 | Kislev has 30 days), and has Passover start on Saturday.") | 997 | Kislev has 30 days), and has Passover start on Saturday.") |
| 940 | 998 | ||
| 941 | (defconst hebrew-calendar-year-Thursday-complete-Sunday | 999 | (defconst calendar-hebrew-year-Thursday-complete-Sunday |
| 942 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1000 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 943 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] | 1001 | 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] |
| 944 | 43 44 45 46 47 48 49 50] | 1002 | 43 44 45 46 47 48 49 50] |
| @@ -947,7 +1005,7 @@ Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev each | |||
| 947 | have 30 days), and has Passover start on Sunday.") | 1005 | have 30 days), and has Passover start on Sunday.") |
| 948 | 1006 | ||
| 949 | ;; The seven leap year types (keviot). | 1007 | ;; The seven leap year types (keviot). |
| 950 | (defconst hebrew-calendar-year-Saturday-incomplete-Tuesday | 1008 | (defconst calendar-hebrew-year-Saturday-incomplete-Tuesday |
| 951 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1009 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 952 | 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42] | 1010 | 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42] |
| 953 | 43 44 45 46 47 48 49 [50 51]] | 1011 | 43 44 45 46 47 48 49 [50 51]] |
| @@ -955,7 +1013,7 @@ have 30 days), and has Passover start on Sunday.") | |||
| 955 | Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev each | 1013 | Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev each |
| 956 | have 29 days), and has Passover start on Tuesday.") | 1014 | have 29 days), and has Passover start on Tuesday.") |
| 957 | 1015 | ||
| 958 | (defconst hebrew-calendar-year-Saturday-complete-Thursday | 1016 | (defconst calendar-hebrew-year-Saturday-complete-Thursday |
| 959 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1017 | [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 960 | 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) | 1018 | 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) |
| 961 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] | 1019 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] |
| @@ -963,7 +1021,7 @@ have 29 days), and has Passover start on Tuesday.") | |||
| 963 | Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each | 1021 | Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each |
| 964 | have 30 days), and has Passover start on Thursday.") | 1022 | have 30 days), and has Passover start on Thursday.") |
| 965 | 1023 | ||
| 966 | (defconst hebrew-calendar-year-Monday-incomplete-Thursday | 1024 | (defconst calendar-hebrew-year-Monday-incomplete-Thursday |
| 967 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1025 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 968 | 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) | 1026 | 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) |
| 969 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] | 1027 | (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] |
| @@ -971,7 +1029,7 @@ have 30 days), and has Passover start on Thursday.") | |||
| 971 | Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each | 1029 | Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each |
| 972 | have 29 days), and has Passover start on Thursday.") | 1030 | have 29 days), and has Passover start on Thursday.") |
| 973 | 1031 | ||
| 974 | (defconst hebrew-calendar-year-Monday-complete-Saturday | 1032 | (defconst calendar-hebrew-year-Monday-complete-Saturday |
| 975 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1033 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 976 | 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) | 1034 | 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) |
| 977 | (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) | 1035 | (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) |
| @@ -980,7 +1038,7 @@ have 29 days), and has Passover start on Thursday.") | |||
| 980 | Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have | 1038 | Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have |
| 981 | 30 days), and has Passover start on Saturday.") | 1039 | 30 days), and has Passover start on Saturday.") |
| 982 | 1040 | ||
| 983 | (defconst hebrew-calendar-year-Tuesday-regular-Saturday | 1041 | (defconst calendar-hebrew-year-Tuesday-regular-Saturday |
| 984 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1042 | [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 985 | 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) | 1043 | 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) |
| 986 | (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) | 1044 | (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) |
| @@ -989,7 +1047,7 @@ Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have | |||
| 989 | Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and | 1047 | Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and |
| 990 | Kislev has 30 days), and has Passover start on Saturday.") | 1048 | Kislev has 30 days), and has Passover start on Saturday.") |
| 991 | 1049 | ||
| 992 | (defconst hebrew-calendar-year-Thursday-incomplete-Sunday | 1050 | (defconst calendar-hebrew-year-Thursday-incomplete-Sunday |
| 993 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1051 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 994 | 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 1052 | 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
| 995 | 43 44 45 46 47 48 49 50] | 1053 | 43 44 45 46 47 48 49 50] |
| @@ -997,7 +1055,7 @@ Kislev has 30 days), and has Passover start on Saturday.") | |||
| 997 | Hebrew year that starts on Thursday, is `incomplete' (Heshvan and Kislev both | 1055 | Hebrew year that starts on Thursday, is `incomplete' (Heshvan and Kislev both |
| 998 | have 29 days), and has Passover start on Sunday.") | 1056 | have 29 days), and has Passover start on Sunday.") |
| 999 | 1057 | ||
| 1000 | (defconst hebrew-calendar-year-Thursday-complete-Tuesday | 1058 | (defconst calendar-hebrew-year-Thursday-complete-Tuesday |
| 1001 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1059 | [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
| 1002 | 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 1060 | 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
| 1003 | 43 44 45 46 47 48 49 [50 51]] | 1061 | 43 44 45 46 47 48 49 [50 51]] |
| @@ -1006,7 +1064,7 @@ Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev both | |||
| 1006 | have 30 days), and has Passover start on Tuesday.") | 1064 | have 30 days), and has Passover start on Tuesday.") |
| 1007 | 1065 | ||
| 1008 | ;;;###diary-autoload | 1066 | ;;;###diary-autoload |
| 1009 | (defun diary-parasha (&optional mark) | 1067 | (defun diary-hebrew-parasha (&optional mark) |
| 1010 | "Parasha diary entry--entry applies if date is a Saturday. | 1068 | "Parasha diary entry--entry applies if date is a Saturday. |
| 1011 | An optional parameter MARK specifies a face or single-character string to | 1069 | An optional parameter MARK specifies a face or single-character string to |
| 1012 | use when highlighting the day in the calendar." | 1070 | use when highlighting the day in the calendar." |
| @@ -1015,21 +1073,21 @@ use when highlighting the day in the calendar." | |||
| 1015 | (let* ((h-year (extract-calendar-year | 1073 | (let* ((h-year (extract-calendar-year |
| 1016 | (calendar-hebrew-from-absolute d))) | 1074 | (calendar-hebrew-from-absolute d))) |
| 1017 | (rosh-hashanah | 1075 | (rosh-hashanah |
| 1018 | (calendar-absolute-from-hebrew (list 7 1 h-year))) | 1076 | (calendar-hebrew-to-absolute (list 7 1 h-year))) |
| 1019 | (passover | 1077 | (passover |
| 1020 | (calendar-absolute-from-hebrew (list 1 15 h-year))) | 1078 | (calendar-hebrew-to-absolute (list 1 15 h-year))) |
| 1021 | (rosh-hashanah-day | 1079 | (rosh-hashanah-day |
| 1022 | (aref calendar-day-name-array (% rosh-hashanah 7))) | 1080 | (aref calendar-day-name-array (% rosh-hashanah 7))) |
| 1023 | (passover-day | 1081 | (passover-day |
| 1024 | (aref calendar-day-name-array (% passover 7))) | 1082 | (aref calendar-day-name-array (% passover 7))) |
| 1025 | (long-h (hebrew-calendar-long-heshvan-p h-year)) | 1083 | (long-h (calendar-hebrew-long-heshvan-p h-year)) |
| 1026 | (short-k (hebrew-calendar-short-kislev-p h-year)) | 1084 | (short-k (calendar-hebrew-short-kislev-p h-year)) |
| 1027 | (type (cond ((and long-h (not short-k)) "complete") | 1085 | (type (cond ((and long-h (not short-k)) "complete") |
| 1028 | ((and (not long-h) short-k) "incomplete") | 1086 | ((and (not long-h) short-k) "incomplete") |
| 1029 | (t "regular"))) | 1087 | (t "regular"))) |
| 1030 | (year-format | 1088 | (year-format |
| 1031 | (symbol-value | 1089 | (symbol-value |
| 1032 | (intern (format "hebrew-calendar-year-%s-%s-%s" ; keviah | 1090 | (intern (format "calendar-hebrew-year-%s-%s-%s" ; keviah |
| 1033 | rosh-hashanah-day type passover-day)))) | 1091 | rosh-hashanah-day type passover-day)))) |
| 1034 | (first-saturday ; of Hebrew year | 1092 | (first-saturday ; of Hebrew year |
| 1035 | (calendar-dayname-on-or-before 6 (+ 6 rosh-hashanah))) | 1093 | (calendar-dayname-on-or-before 6 (+ 6 rosh-hashanah))) |
| @@ -1043,14 +1101,16 @@ use when highlighting the day in the calendar." | |||
| 1043 | (if (listp parasha) ; Israel differs from diaspora | 1101 | (if (listp parasha) ; Israel differs from diaspora |
| 1044 | (if (car parasha) | 1102 | (if (car parasha) |
| 1045 | (format "%s (diaspora), %s (Israel)" | 1103 | (format "%s (diaspora), %s (Israel)" |
| 1046 | (hebrew-calendar-parasha-name | 1104 | (calendar-hebrew-parasha-name |
| 1047 | (car parasha)) | 1105 | (car parasha)) |
| 1048 | (hebrew-calendar-parasha-name | 1106 | (calendar-hebrew-parasha-name |
| 1049 | (cdr parasha))) | 1107 | (cdr parasha))) |
| 1050 | (format "%s (Israel)" | 1108 | (format "%s (Israel)" |
| 1051 | (hebrew-calendar-parasha-name | 1109 | (calendar-hebrew-parasha-name |
| 1052 | (cdr parasha)))) | 1110 | (cdr parasha)))) |
| 1053 | (hebrew-calendar-parasha-name parasha))))))))) | 1111 | (calendar-hebrew-parasha-name parasha))))))))) |
| 1112 | |||
| 1113 | (define-obsolete-function-alias 'diary-parasha 'diary-hebrew-parasha "23.1") | ||
| 1054 | 1114 | ||
| 1055 | (provide 'cal-hebrew) | 1115 | (provide 'cal-hebrew) |
| 1056 | 1116 | ||