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))) |
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 |
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 |