Mercurial > emacs
changeset 6334:70e916a2457d
(lunar-phase): Use calendar-mod instead of % so that it
works for negative phase numbers.
author | Edward M. Reingold <reingold@emr.cs.iit.edu> |
---|---|
date | Mon, 14 Mar 1994 17:21:31 +0000 |
parents | f3fe542e8cd7 |
children | fe5cb6ca692a |
files | lisp/calendar/lunar.el |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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))