# HG changeset patch # User Edward M. Reingold # Date 763665691 0 # Node ID 70e916a2457de6a8ea48b93608d8422ca34ceb38 # Parent f3fe542e8cd7ccaa1f0409b7df37dd16ac9a3ddb (lunar-phase): Use calendar-mod instead of % so that it works for negative phase numbers. diff -r f3fe542e8cd7 -r 70e916a2457d lisp/calendar/lunar.el --- a/lisp/calendar/lunar.el Mon Mar 14 17:07:06 1994 +0000 +++ b/lisp/calendar/lunar.el Mon Mar 14 17:21:31 1994 +0000 @@ -84,7 +84,7 @@ Integer below INDEX/4 gives the lunation number, counting from Jan 1, 1900; remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, 3 last quarter." - (let* ((phase (% index 4)) + (let* ((phase (calendar-mod index 4)) (index (/ index 4.0)) (time (/ index 1236.85)) (date (+ (calendar-absolute-from-gregorian '(1 0.5 1900))