diff options
| author | Edward M. Reingold | 1994-03-14 17:21:31 +0000 |
|---|---|---|
| committer | Edward M. Reingold | 1994-03-14 17:21:31 +0000 |
| commit | d928d7e5624d24cf27ff62d8a431adb1bca7e0e8 (patch) | |
| tree | f0be4d0ec111007af8702f40b225701d5f88a0c7 | |
| parent | e14e13a4cdb8990bfceecb61b52f4a635c35eb60 (diff) | |
| download | emacs-d928d7e5624d24cf27ff62d8a431adb1bca7e0e8.tar.gz emacs-d928d7e5624d24cf27ff62d8a431adb1bca7e0e8.zip | |
(lunar-phase): Use calendar-mod instead of % so that it
works for negative phase numbers.
| -rw-r--r-- | lisp/calendar/lunar.el | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ | |||
| 84 | Integer below INDEX/4 gives the lunation number, counting from Jan 1, 1900; | 84 | Integer below INDEX/4 gives the lunation number, counting from Jan 1, 1900; |
| 85 | remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, | 85 | remainder mod 4 gives the phase: 0 new moon, 1 first quarter, 2 full moon, |
| 86 | 3 last quarter." | 86 | 3 last quarter." |
| 87 | (let* ((phase (% index 4)) | 87 | (let* ((phase (calendar-mod index 4)) |
| 88 | (index (/ index 4.0)) | 88 | (index (/ index 4.0)) |
| 89 | (time (/ index 1236.85)) | 89 | (time (/ index 1236.85)) |
| 90 | (date (+ (calendar-absolute-from-gregorian '(1 0.5 1900)) | 90 | (date (+ (calendar-absolute-from-gregorian '(1 0.5 1900)) |