comparison lisp/calendar/lunar.el @ 5213:e080f780f381

(lunar-phase): Add calendar-time-zone to solar ephemeris correction. This fixes a bug where GMT was being reported as if it were local time.
author Paul Eggert <eggert@twinsun.com>
date Sun, 05 Dec 1993 18:29:24 +0000
parents 362a75ca07d9
children 47563495ca14
comparison
equal deleted inserted replaced
5212:f8ba69b02832 5213:e080f780f381
1 ;;; lunar.el --- calendar functions for phases of the moon. 1 ;;; lunar.el --- calendar functions for phases of the moon.
2 2
3 ;; Copyright (C) 1992 Free Software Foundation, Inc. 3 ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
4 4
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6 ;; Keywords: calendar 6 ;; Keywords: calendar
7 ;; Human-Keywords: moon, lunar phases, calendar, diary 7 ;; Human-Keywords: moon, lunar phases, calendar, diary
8 8
158 moon-anomaly)))) 158 moon-anomaly))))
159 (adjustment (cond ((= phase 1) (+ adjustment adj)) 159 (adjustment (cond ((= phase 1) (+ adjustment adj))
160 ((= phase 2) (- adjustment adj)) 160 ((= phase 2) (- adjustment adj))
161 (t adjustment))) 161 (t adjustment)))
162 (date (+ date adjustment)) 162 (date (+ date adjustment))
163 (date (+ date (- (/ (solar-ephemeris-correction 163 (date (+ date (/ (- calendar-time-zone
164 (solar-ephemeris-correction
164 (extract-calendar-year 165 (extract-calendar-year
165 (calendar-gregorian-from-absolute 166 (calendar-gregorian-from-absolute
166 (truncate date)))) 60.0 24.0)))) 167 (truncate date)))))
168 60.0 24.0)))
167 (time (* 24 (- date (truncate date)))) 169 (time (* 24 (- date (truncate date))))
168 (date (calendar-gregorian-from-absolute (truncate date)))) 170 (date (calendar-gregorian-from-absolute (truncate date))))
169 (list date (solar-time-string time date) phase))) 171 (list date (solar-time-string time date) phase)))
170 172
171 (defun lunar-phase-name (phase) 173 (defun lunar-phase-name (phase)