summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-02-12 20:57:49 +0100
committerUlrich Müller <ulm@gentoo.org>2023-02-13 07:15:36 +0100
commitcc30422825a5acf460d026bfe912b327b70dedcf (patch)
treea76e08959b9d65677d1e766de376e9d9edc44a51 /lisp/calendar
parentf2114e8d89feed154a1c523c925ff2fb9fa9ba9a (diff)
downloademacs-cc30422825a5acf460d026bfe912b327b70dedcf.tar.gz
Fix spurious display of eclipses in Calendar
* lisp/calendar/lunar.el (eclipse-check): Don't show an eclipse unless the phase is new moon or full moon. (bug#61460) * test/lisp/calendar/lunar-tests.el (lunar-test-eclipse-check) (lunar-test-phase-list): Update tests.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/lunar.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 0db811417af..70681f42c90 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -161,7 +161,9 @@ remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon,
(phase-name (cond ((= phase 0) "Solar")
((= phase 2) "Lunar")
(t ""))))
- (cond ((< moon-lat 2.42600766e-1)
+ (cond ((string= phase-name "")
+ "")
+ ((< moon-lat 2.42600766e-1)
(concat "** " phase-name " Eclipse **"))
((< moon-lat 0.37)
(concat "** " phase-name " Eclipse possible **"))