From: Edward M. Reingold Date: Mon, 14 Mar 1994 17:21:31 +0000 (+0000) Subject: (lunar-phase): Use calendar-mod instead of % so that it X-Git-Tag: emacs-19.34~9518 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d928d7e5624d24cf27ff62d8a431adb1bca7e0e8;p=emacs.git (lunar-phase): Use calendar-mod instead of % so that it works for negative phase numbers. --- diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index dd0501083b6..9fe7f6fa530 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -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))