/[emacs]/emacs/lisp/calendar/cal-hebrew.el
ViewVC logotype

Diff of /emacs/lisp/calendar/cal-hebrew.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by rms, Sat Jul 27 19:01:40 2002 UTC revision 1.15 by lektu, Tue Feb 4 12:49:33 2003 UTC
# Line 115  Gregorian date Sunday, December 31, 1 BC Line 115  Gregorian date Sunday, December 31, 1 BC
115              day)))              day)))
116      (if ;; If Rosh HaShanah would occur on Sunday, Wednesday, or Friday      (if ;; If Rosh HaShanah would occur on Sunday, Wednesday, or Friday
117          (memq (% alternative-day 7) (list 0 3 5))          (memq (% alternative-day 7) (list 0 3 5))
118    ;; Then postpone it one (more) day and return            ;; Then postpone it one (more) day and return
119          (1+ alternative-day)          (1+ alternative-day)
120    ;; Else return            ;; Else return
121        alternative-day)))        alternative-day)))
122    
123  (defun hebrew-calendar-days-in-year (year)  (defun hebrew-calendar-days-in-year (year)
# Line 316  nil if it is not visible in the current Line 316  nil if it is not visible in the current
316                (list (calendar-gregorian-from-absolute (+ abs-r-h 22))                (list (calendar-gregorian-from-absolute (+ abs-r-h 22))
317                      "Simchat Torah")))                      "Simchat Torah")))
318             (optional             (optional
319              (list              (list
320               (list (calendar-gregorian-from-absolute               (list (calendar-gregorian-from-absolute
321                      (calendar-dayname-on-or-before 6 (- abs-r-h 4)))                      (calendar-dayname-on-or-before 6 (- abs-r-h 4)))
322                     "Selichot (night)")                     "Selichot (night)")
# Line 350  nil if it is not visible in the current Line 350  nil if it is not visible in the current
350               (filter-visible-calendar-holidays mandatory)))               (filter-visible-calendar-holidays mandatory)))
351        (if all-hebrew-calendar-holidays        (if all-hebrew-calendar-holidays
352            (setq output-list            (setq output-list
353                  (append                  (append
354                   (filter-visible-calendar-holidays optional)                   (filter-visible-calendar-holidays optional)
355                   output-list)))                   output-list)))
356        output-list)))        output-list)))
# Line 401  nil if it is not visible in the current Line 401  nil if it is not visible in the current
401               (list (calendar-gregorian-from-absolute (+ abs-p 50))               (list (calendar-gregorian-from-absolute (+ abs-p 50))
402                     "Shavuot")))                     "Shavuot")))
403             (optional             (optional
404              (list              (list
405               (list (calendar-gregorian-from-absolute               (list (calendar-gregorian-from-absolute
406                      (calendar-dayname-on-or-before 6 (- abs-p 43)))                      (calendar-dayname-on-or-before 6 (- abs-p 43)))
407                     "Shabbat Shekalim")                     "Shabbat Shekalim")
# Line 467  nil if it is not visible in the current Line 467  nil if it is not visible in the current
467               (filter-visible-calendar-holidays mandatory)))               (filter-visible-calendar-holidays mandatory)))
468        (if all-hebrew-calendar-holidays        (if all-hebrew-calendar-holidays
469            (setq output-list            (setq output-list
470                  (append                  (append
471                   (filter-visible-calendar-holidays optional)                   (filter-visible-calendar-holidays optional)
472                   output-list)))                   output-list)))
473        output-list)))        output-list)))
# Line 481  nil if it is not visible in the current Line 481  nil if it is not visible in the current
481                        (list 5 9 (+ displayed-year 3760)))))                        (list 5 9 (+ displayed-year 3760)))))
482    
483        (filter-visible-calendar-holidays        (filter-visible-calendar-holidays
484         (list         (list
485          (list (calendar-gregorian-from-absolute          (list (calendar-gregorian-from-absolute
486                 (if (= (% abs-t-a 7) 6) (- abs-t-a 20) (- abs-t-a 21)))                 (if (= (% abs-t-a 7) 6) (- abs-t-a 20) (- abs-t-a 21)))
487                "Tzom Tammuz")                "Tzom Tammuz")
# Line 513  not be marked in the calendar.  This fun Line 513  not be marked in the calendar.  This fun
513              (mark (regexp-quote diary-nonmarking-symbol)))              (mark (regexp-quote diary-nonmarking-symbol)))
514          (calendar-for-loop i from 1 to number do          (calendar-for-loop i from 1 to number do
515             (let* ((d diary-date-forms)             (let* ((d diary-date-forms)
516                    (hdate (calendar-hebrew-from-absolute                    (hdate (calendar-hebrew-from-absolute
517                            (calendar-absolute-from-gregorian gdate)))                            (calendar-absolute-from-gregorian gdate)))
518                    (month (extract-calendar-month hdate))                    (month (extract-calendar-month hdate))
519                    (day (extract-calendar-day hdate))                    (day (extract-calendar-day hdate))
# Line 683  is provided for use as part of the nongr Line 683  is provided for use as part of the nongr
683                        (setq mm 0)                        (setq mm 0)
684                      (setq                      (setq
685                        mm                        mm
686                        (cdr                        (cdr
687                          (assoc-ignore-case                          (assoc-ignore-case
688                           mm-name                           mm-name
689                           (calendar-make-alist                           (calendar-make-alist
# Line 775  Prefix arg will make the entry nonmarkin Line 775  Prefix arg will make the entry nonmarkin
775      (make-diary-entry      (make-diary-entry
776       (concat       (concat
777        hebrew-diary-entry-symbol        hebrew-diary-entry-symbol
778        (calendar-date-string        (calendar-date-string
779         (calendar-hebrew-from-absolute         (calendar-hebrew-from-absolute
780          (calendar-absolute-from-gregorian          (calendar-absolute-from-gregorian
781           (calendar-cursor-to-date t)))           (calendar-cursor-to-date t)))
# Line 794  Prefix arg will make the entry nonmarkin Line 794  Prefix arg will make the entry nonmarkin
794      (make-diary-entry      (make-diary-entry
795       (concat       (concat
796        hebrew-diary-entry-symbol        hebrew-diary-entry-symbol
797        (calendar-date-string        (calendar-date-string
798         (calendar-hebrew-from-absolute         (calendar-hebrew-from-absolute
799          (calendar-absolute-from-gregorian          (calendar-absolute-from-gregorian
800           (calendar-cursor-to-date t)))))           (calendar-cursor-to-date t)))))
# Line 814  Prefix arg will make the entry nonmarkin Line 814  Prefix arg will make the entry nonmarkin
814      (make-diary-entry      (make-diary-entry
815       (concat       (concat
816        hebrew-diary-entry-symbol        hebrew-diary-entry-symbol
817        (calendar-date-string        (calendar-date-string
818         (calendar-hebrew-from-absolute         (calendar-hebrew-from-absolute
819          (calendar-absolute-from-gregorian          (calendar-absolute-from-gregorian
820           (calendar-cursor-to-date t)))))           (calendar-cursor-to-date t)))))
# Line 900  from the cursor position." Line 900  from the cursor position."
900    "Omer count diary entry.    "Omer count diary entry.
901  Entry applies if date is within 50 days after Passover.  Entry applies if date is within 50 days after Passover.
902    
903  An optional parameter MARK specifies a face or single-character string to  An optional parameter MARK specifies a face or single-character string to
904  use when highlighting the day in the calendar."  use when highlighting the day in the calendar."
905    (let* ((passover    (let* ((passover
906            (calendar-absolute-from-hebrew            (calendar-absolute-from-hebrew
# Line 909  use when highlighting the day in the cal Line 909  use when highlighting the day in the cal
909           (week (/ omer 7))           (week (/ omer 7))
910           (day (% omer 7)))           (day (% omer 7)))
911      (if (and (> omer 0) (< omer 50))      (if (and (> omer 0) (< omer 50))
912          (cons mark          (cons mark
913                (format "Day %d%s of the omer (until sunset)"                (format "Day %d%s of the omer (until sunset)"
914                        omer                        omer
915                        (if (zerop week)                        (if (zerop week)
# Line 930  although the date of death is specified Line 930  although the date of death is specified
930  Hebrew calendar yahrzeit is determined.  If `european-calendar-style' is t, the  Hebrew calendar yahrzeit is determined.  If `european-calendar-style' is t, the
931  order of the parameters is changed to DEATH-DAY, DEATH-MONTH, DEATH-YEAR.  order of the parameters is changed to DEATH-DAY, DEATH-MONTH, DEATH-YEAR.
932    
933  An optional parameter MARK specifies a face or single-character string to  An optional parameter MARK specifies a face or single-character string to
934  use when highlighting the day in the calendar."  use when highlighting the day in the calendar."
935    (let* ((h-date (calendar-hebrew-from-absolute    (let* ((h-date (calendar-hebrew-from-absolute
936                    (calendar-absolute-from-gregorian                    (calendar-absolute-from-gregorian
# Line 959  use when highlighting the day in the cal Line 959  use when highlighting the day in the cal
959    "Rosh Hodesh diary entry.    "Rosh Hodesh diary entry.
960  Entry applies if date is Rosh Hodesh, the day before, or the Saturday before.  Entry applies if date is Rosh Hodesh, the day before, or the Saturday before.
961    
962  An optional parameter MARK specifies a face or single-character string to  An optional parameter MARK specifies a face or single-character string to
963  use when highlighting the day in the calendar."  use when highlighting the day in the calendar."
964    (let* ((d (calendar-absolute-from-gregorian date))    (let* ((d (calendar-absolute-from-gregorian date))
965           (h-date (calendar-hebrew-from-absolute d))           (h-date (calendar-hebrew-from-absolute d))
# Line 976  use when highlighting the day in the cal Line 976  use when highlighting the day in the cal
976           (h-yesterday (extract-calendar-day           (h-yesterday (extract-calendar-day
977                         (calendar-hebrew-from-absolute (1- d)))))                         (calendar-hebrew-from-absolute (1- d)))))
978      (if (or (= h-day 30) (and (= h-day 1) (/= h-month 7)))      (if (or (= h-day 30) (and (= h-day 1) (/= h-month 7)))
979          (cons mark          (cons mark
980                (format                (format
981                 "Rosh Hodesh %s"                 "Rosh Hodesh %s"
982                 (if (= h-day 30)                 (if (= h-day 30)
# Line 990  use when highlighting the day in the cal Line 990  use when highlighting the day in the cal
990                       (format "%s (second day)" this-month)                       (format "%s (second day)" this-month)
991                     this-month))))                     this-month))))
992        (if (= (% d 7) 6) ;; Saturday--check for Shabbat Mevarchim        (if (= (% d 7) 6) ;; Saturday--check for Shabbat Mevarchim
993            (cons mark            (cons mark
994                  (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day))                  (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day))
995                         (format "Mevarchim Rosh Hodesh %s (%s)"                         (format "Mevarchim Rosh Hodesh %s (%s)"
996                                 (aref h-month-names                                 (aref h-month-names
# Line 1019  use when highlighting the day in the cal Line 1019  use when highlighting the day in the cal
1019  (defun diary-parasha (&optional mark)  (defun diary-parasha (&optional mark)
1020    "Parasha diary entry--entry applies if date is a Saturday.    "Parasha diary entry--entry applies if date is a Saturday.
1021    
1022  An optional parameter MARK specifies a face or single-character string to  An optional parameter MARK specifies a face or single-character string to
1023  use when highlighting the day in the calendar."  use when highlighting the day in the calendar."
1024    (let ((d (calendar-absolute-from-gregorian date)))    (let ((d (calendar-absolute-from-gregorian date)))
1025      (if (= (% d 7) 6) ;;  Saturday      (if (= (% d 7) 6) ;;  Saturday

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26