GNU bug report logs -
#61460
30.0.50; Calendar shows eclipse for quarter moon
Previous Next
Reported by: Ulrich Mueller <ulm <at> gentoo.org>
Date: Sun, 12 Feb 2023 19:58:02 UTC
Severity: normal
Found in version 30.0.50
Fixed in version 30.1
Done: Ulrich Müller <ulm <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Michael Heerdegen <michael_heerdegen <at> web.de> writes:
> That remark made me think about whether we want a `diary-eclipses' - or
> teach `diary-lunar-phases' to report eclipses (at the moment the latter
> doesn't report eclipses, I just tried).
Seems getting the latter is quite simple:
[lunar-diary-eclipse.diff (text/x-diff, inline)]
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 4f8f34d954f..5b73bb6e29e 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -284,8 +284,13 @@ diary-lunar-phases
(setq index (1+ index)
phase (lunar-phase index)))
(if (calendar-date-equal (car phase) date)
- (cons mark (concat (lunar-phase-name (nth 2 phase)) " "
- (cadr phase))))))
+ (cons mark
+ (let ((eclipse (nth 3 phase)))
+ (concat (lunar-phase-name (nth 2 phase)) " "
+ (cadr phase)
+ (if (string-empty-p eclipse)
+ ""
+ (concat " " eclipse))))))))
;; For the Chinese calendar the calculations for the new moon need to be more
;; accurate than those above, so we use more terms in the approximation.
[Message part 3 (text/plain, inline)]
Michael.
This bug report was last modified 2 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.