/[emacs]/emacs/lisp/calendar/lunar.el
ViewVC logotype

Diff of /emacs/lisp/calendar/lunar.el

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

revision 1.17 by pj, Mon Jul 16 07:46:48 2001 UTC revision 1.17.8.1 by miles, Fri Apr 4 06:20:16 2003 UTC
# Line 64  Line 64 
64      (increment-calendar-month end-month end-year 3)      (increment-calendar-month end-month end-year 3)
65      (increment-calendar-month start-month start-year -1)      (increment-calendar-month start-month start-year -1)
66      (let* ((end-date (list (list end-month 1 end-year)))      (let* ((end-date (list (list end-month 1 end-year)))
67             (start-date (list (list start-month             (start-date (list (list start-month
68                                     (calendar-last-day-of-month                                     (calendar-last-day-of-month
69                                      start-month start-year)                                      start-month start-year)
70                                     start-year)))                                     start-year)))
# Line 236  This function is suitable for execution Line 236  This function is suitable for execution
236             (displayed-year (extract-calendar-year date)))             (displayed-year (extract-calendar-year date)))
237        (calendar-phases-of-moon))))        (calendar-phases-of-moon))))
238    
239  (defun diary-phases-of-moon ()  (defun diary-phases-of-moon (&optional mark)
240    "Moon phases diary entry."  "Moon phases diary entry.
241    
242    An optional parameter MARK specifies a face or single-character string to
243    use when highlighting the day in the calendar."
244    (let* ((index (* 4    (let* ((index (* 4
245                     (truncate                     (truncate
246                      (* 12.3685                      (* 12.3685
# Line 250  This function is suitable for execution Line 253  This function is suitable for execution
253        (setq index (1+ index))        (setq index (1+ index))
254        (setq phase (lunar-phase index)))        (setq phase (lunar-phase index)))
255      (if (calendar-date-equal (car phase) date)      (if (calendar-date-equal (car phase) date)
256          (concat (lunar-phase-name (car (cdr (cdr phase)))) " "          (cons mark (concat (lunar-phase-name (car (cdr (cdr phase)))) " "
257                  (car (cdr phase))))))                  (car (cdr phase)))))))
258    
259    
260  ;;  For the Chinese calendar the calculations for the new moon need to be more  ;;  For the Chinese calendar the calculations for the new moon need to be more

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.17.8.1

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